From 82a97c9a06899c9924ec6e801649341e300fa1b8 Mon Sep 17 00:00:00 2001 From: dsgnr Date: Tue, 5 Nov 2024 12:49:13 +0000 Subject: [PATCH] Fix nginx proxy for api --- frontend/nginx/nginx.conf | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/frontend/nginx/nginx.conf b/frontend/nginx/nginx.conf index 7ec5664..957e9aa 100644 --- a/frontend/nginx/nginx.conf +++ b/frontend/nginx/nginx.conf @@ -1,5 +1,14 @@ server { listen 80; + + location ~ ^/(api|docs) { + proxy_pass http://api: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; + } + location / { root /usr/share/nginx/html; index index.html;