🔧 Fix CORS and API endpoint issues
- Fix API endpoint paths (remove trailing slashes for 405 errors) - Update API URLs to use api-todo.hyungi.net subdomain for HTTPS compatibility - Improve CORS settings parsing in backend (handle brackets and quotes) - Add frontend volume mount to docker-compose for real-time file updates - Update Synology deployment config with wildcard CORS settings Resolves: - 405 Method Not Allowed errors - Mixed Content security issues (HTTPS → HTTP) - CORS preflight request failures - Docker build requirements for every file change Tested: API endpoints now correctly use HTTPS subdomain, eliminating security blocks
This commit is contained in:
@@ -39,7 +39,9 @@ cors_origins = []
|
||||
if settings.CORS_ORIGINS == "*":
|
||||
cors_origins = ["*"]
|
||||
else:
|
||||
cors_origins = [origin.strip() for origin in settings.CORS_ORIGINS.split(",")]
|
||||
# 공백과 대괄호 제거 후 쉼표로 분리
|
||||
cors_str = settings.CORS_ORIGINS.strip('[]"\'')
|
||||
cors_origins = [origin.strip().strip('"\'') for origin in cors_str.split(",") if origin.strip()]
|
||||
|
||||
logger.info(f"🌐 CORS Origins: {cors_origins}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user