diff --git a/backend/routes/clickTtHttpPageRoutes.js b/backend/routes/clickTtHttpPageRoutes.js
index 21aee5df..bfb5f030 100644
--- a/backend/routes/clickTtHttpPageRoutes.js
+++ b/backend/routes/clickTtHttpPageRoutes.js
@@ -272,22 +272,22 @@ router.post('/proxy', async (req, res, next) => {
}
}
- let body = result.body;
- const contentType = result.contentType || '';
- if (body && contentType.includes('text/html')) {
+ let responseBody = result.body;
+ const responseContentType = result.contentType || '';
+ if (responseBody && responseContentType.includes('text/html')) {
const baseUrl = process.env.BACKEND_BASE_URL || process.env.BASE_URL
|| `${req.protocol || 'http'}://${req.get('host') || 'localhost:' + (process.env.PORT || 3005)}`;
const proxyBase = baseUrl.replace(/\/$/, '') + '/api/clicktt/proxy';
- body = body
+ responseBody = responseBody
.replace(/]*http-equiv=["']content-security-policy["'][^>]*>/gi, '')
.replace(/]*http-equiv=["']x-frame-options["'][^>]*>/gi, '');
const pageOrigin = (() => { try { return new URL(targetUrl).origin + '/'; } catch { return null; } })();
if (pageOrigin) {
- body = body.replace(/