fix: resolve mixed content and upload payload too large errors
Build and Deploy / build-and-push (push) Failing after 26s
Build and Deploy / build-and-push (push) Failing after 26s
This commit is contained in:
+1
-1
@@ -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 });
|
||||
});
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
|
||||
<title>Titan - Product configurator.</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
Reference in New Issue
Block a user