diff --git a/server.js b/server.js index 8ac9852..0f290c9 100644 --- a/server.js +++ b/server.js @@ -147,7 +147,7 @@ async function consturctServer(moduleDefs) { if (req.path !== '/' && !req.path.includes('.')) { res.set({ 'Access-Control-Allow-Credentials': true, - 'Access-Control-Allow-Origin': '*', + 'Access-Control-Allow-Origin': CORS_ALLOW_ORIGIN || req.headers.origin || '*', 'Access-Control-Allow-Headers': 'X-Requested-With,Content-Type', 'Access-Control-Allow-Methods': 'PUT,POST,GET,DELETE,OPTIONS', 'Content-Type': 'application/json; charset=utf-8',