Skip to content

Commit 7db01dd

Browse files
author
colto
committed
Fix nginx proxy for /api routes
1 parent 46edc12 commit 7db01dd

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

frontend/nginx.conf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ server {
55
root /usr/share/nginx/html;
66
index index.html;
77

8+
location /api/ {
9+
proxy_pass http://127.0.0.1:8080;
10+
proxy_http_version 1.1;
11+
proxy_set_header Host $host;
12+
proxy_set_header X-Real-IP $remote_addr;
13+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
14+
proxy_set_header X-Forwarded-Proto $scheme;
15+
}
16+
817
location / {
918
try_files $uri $uri/ /index.html;
1019
}

0 commit comments

Comments
 (0)