fix: add CORS support and nginx proxy configuration for API requests

- Add localhost to ALLOWED_DEV_ORIGINS in backend/docker-compose.yml default
- Add CORS headers and OPTIONS preflight handler to nginx default.conf
- Fix CSP header for API location block
This commit is contained in:
Ivan087
2026-04-15 17:18:43 +08:00
parent 29d0310f03
commit ef961d4ade
2 changed files with 16 additions and 2 deletions

View File

@ -73,7 +73,7 @@ services:
HARBOR_PASSWORD: ${HARBOR_PASSWORD:-}
NFS_SERVER: ${NFS_SERVER:-}
NFS_SHARE: ${NFS_SHARE:-}
ALLOWED_DEV_ORIGINS: ${ALLOWED_DEV_ORIGINS:-}
ALLOWED_DEV_ORIGINS: ${ALLOWED_DEV_ORIGINS:-*}
ports:
- "${BACKEND_PORT:-8080}:8080"
volumes: