Skip to content

Commit fe8b1f8

Browse files
authored
revert
1 parent bd854bd commit fe8b1f8

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

server/main.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,7 @@ async function main() {
2929

3030
// allow origin https://localhost
3131
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-
}
32+
res.header('Access-Control-Allow-Origin', 'https://localhost');
4233
// allow content-type
4334
res.header('Access-Control-Allow-Headers', 'Content-Type');
4435
next();

0 commit comments

Comments
 (0)