🔧 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:
hyungi
2025-09-24 18:54:07 +09:00
parent 2ccdf8c411
commit 03e6fe5b91
5 changed files with 92 additions and 13 deletions

View File

@@ -25,9 +25,11 @@ DEBUG=false
POSTGRES_USER=todo_user
POSTGRES_DB=todo_db
# --- CORS 설정 (시놀로지 IP/도메인에 맞게 수정) ---
# 예시: CORS_ORIGINS=["http://192.168.1.100:4000", "https://your-domain.synology.me:4000"]
CORS_ORIGINS=["http://localhost:4000", "http://127.0.0.1:4000"]
# --- CORS 설정 (시놀로지 배포용) ---
# 프로덕션 환경에서 모든 출처 허용 (보안상 주의 필요)
CORS_ORIGINS=*
# 또는 특정 IP만 허용하려면:
# CORS_ORIGINS=http://192.168.1.100:4000,https://your-domain.synology.me:4000
# --- Synology MailPlus 통합 설정 (선택사항) ---
SYNOLOGY_MAIL_SERVER=