feat(backend): CORS 허용 오리진 설정 추가
- WebServerConfig.cors_origins(list) 추가, config 의 오리진이 있을 때만 CORSMiddleware 적용 - 명시적 오리진이라 allow_credentials=true (Authorization 헤더 허용) - 로컬 기본값: http://localhost:5173, http://127.0.0.1:5173 (Vite) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
5940f54d2b
commit
2832162672
3 files changed
+17
No files matched your search
@@ -7,6 +7,8 @@ port = 9300
|
||||
process_count = 1
|
||||
is_ssl = false
|
||||
is_test = true
|
||||
# CORS 허용 오리진(프론트). 비우면 [] (CORS 미적용). 예: 로컬 Vite = http://localhost:5173
|
||||
cors_origins = ["http://localhost:5173", "http://127.0.0.1:5173"]
|
||||
|
||||
[LogConfig]
|
||||
print_console = true
|
||||
|
||||
@@ -7,6 +7,8 @@ class WebServerConfig(ConfigModel):
|
||||
process_count: int = 1
|
||||
is_ssl: bool = False
|
||||
is_test: bool = False
|
||||
# CORS 허용 오리진(프론트). 비우면 CORS 미적용. 예: ["http://localhost:5173"]
|
||||
cors_origins: list[str] = []
|
||||
|
||||
|
||||
class LogConfig(ConfigModel):
|
||||
|
||||
Reference in new issue
Block a user