We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd854bd commit fe8b1f8Copy full SHA for fe8b1f8
server/main.js
@@ -29,16 +29,7 @@ async function main() {
29
30
// allow origin https://localhost
31
app.use((_req, res, next) => {
32
- const allowedOrigins = [
33
- 'https://preview--acode-code-hub.lovable.app', // temp, for dev only
34
- 'http://localhost:8080', // temp, for dev only
35
- 'https://localhost',
36
- ];
37
- const origin = req.headers.origin;
38
-
39
- if (allowedOrigins.includes(origin)) {
40
- res.header('Access-Control-Allow-Origin', origin);
41
- }
+ res.header('Access-Control-Allow-Origin', 'https://localhost');
42
// allow content-type
43
res.header('Access-Control-Allow-Headers', 'Content-Type');
44
next();
0 commit comments