Changed origin to variable passed when running the container. Limited to only POST method.

This commit is contained in:
K
2025-07-23 01:01:52 +05:30
parent b67f7557ee
commit fc9e3ac0f2
+3 -2
View File
@@ -9,10 +9,11 @@ const app = express();
const PORT = 8081; const PORT = 8081;
const corsOptions = { const corsOptions = {
origin: "http://frontend:3000", origin: "${FRONTEND_URI}",
methods: "GET,PUT,POST", methods: "POST",
credentials: true, credentials: true,
}; };
//methods: "GET,HEAD,PUT,PATCH,POST,DELETE",
app.use(cors(corsOptions)); app.use(cors(corsOptions));