From 39d131a9a5ca50ce2633e883fc2081e49be29565 Mon Sep 17 00:00:00 2001 From: AI Bot Date: Wed, 2 Sep 2026 01:12:38 +0530 Subject: [PATCH] fix: resolve mixed content and upload payload too large errors --- backend/server.js | 2 +- index.html | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/server.js b/backend/server.js index a2846af..e6effde 100644 --- a/backend/server.js +++ b/backend/server.js @@ -212,7 +212,7 @@ app.post('/api/users/deduct-credit', authenticate, async (req, res) => { // 10. Upload file app.post('/api/upload', authenticate, upload.single('file'), (req, res) => { if (!req.file) return res.status(400).json({ error: 'No file uploaded' }); - const url = `${req.protocol}://${req.get('host')}/uploads/${req.file.filename}`; + const url = `/uploads/${req.file.filename}`; res.json({ url }); }); diff --git a/index.html b/index.html index dd051ef..16a1538 100644 --- a/index.html +++ b/index.html @@ -3,6 +3,7 @@ + Titan - Product configurator.