diff --git a/appsecret.txt b/appsecret.txt deleted file mode 100644 index a730a6c..0000000 --- a/appsecret.txt +++ /dev/null @@ -1 +0,0 @@ -d1ea611b126140dda0f3a4c541346d7a \ No newline at end of file diff --git a/deploy/nginx/nginx-http-init.conf b/deploy/nginx/nginx-http-init.conf index f9eb594..e030eb0 100644 --- a/deploy/nginx/nginx-http-init.conf +++ b/deploy/nginx/nginx-http-init.conf @@ -18,6 +18,13 @@ server { proxy_read_timeout 120s; } + location /oauth/ { + proxy_pass http://backend:8000; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_read_timeout 120s; + } + location / { proxy_pass http://frontend:80; proxy_set_header Host $host; diff --git a/deploy/nginx/nginx-https.conf b/deploy/nginx/nginx-https.conf index 24191e2..3853031 100644 --- a/deploy/nginx/nginx-https.conf +++ b/deploy/nginx/nginx-https.conf @@ -42,6 +42,16 @@ server { proxy_buffering off; } + # OAuth login/callback (Saxo, etc.) — FastAPI, pas le frontend SPA + location /oauth/ { + proxy_pass http://backend:8000; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_read_timeout 120s; + } + # Swagger docs FastAPI location /docs { proxy_pass http://backend:8000; diff --git a/deploy/update.sh b/deploy/update.sh index 7573c2b..0af22cd 100644 --- a/deploy/update.sh +++ b/deploy/update.sh @@ -11,6 +11,9 @@ git pull cd deploy +echo "[UPDATE] Sync config nginx (nginx-https.conf -> nginx.conf)..." +cp nginx/nginx-https.conf nginx/nginx.conf + echo "[UPDATE] Rebuild et redémarrage des containers..." docker compose up -d --build