ip adress 추가

This commit is contained in:
2025-09-04 11:46:42 +09:00
parent feb26fa32a
commit 2d6b0fc7ce
4 changed files with 29 additions and 6 deletions

View File

@@ -29,7 +29,7 @@ app.use(express.urlencoded({ extended: true, limit: "10mb" }));
// CORS 설정
app.use(
cors({
origin: config.cors.origin,
origin: config.cors.origin.split(',').map(url => url.trim()),
credentials: true,
methods: ["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"],
allowedHeaders: ["Content-Type", "Authorization", "X-Requested-With"],

View File

@@ -82,8 +82,8 @@ const config: Config = {
// CORS 설정
cors: {
origin: process.env.CORS_ORIGIN || "http://localhost:9771",
credentials: process.env.CORS_CREDENTIALS === "true",
origin: process.env.CORS_ORIGIN || "http://localhost:9771,http://192.168.0.70:5555,http://39.117.244.52:5555",
credentials: process.env.CORS_CREDENTIALS === "true" || true,
},
// 로깅 설정