Fix api requests forwardding
This commit is contained in:
@@ -15,7 +15,7 @@ server {
|
|||||||
listen 80;
|
listen 80;
|
||||||
server_name unluckiest.naaturel.be www.unluckiest.naaturel.be;
|
server_name unluckiest.naaturel.be www.unluckiest.naaturel.be;
|
||||||
|
|
||||||
return 301 https://$host$request_uri;
|
return 307 https://$host$request_uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
@@ -38,14 +38,14 @@ server {
|
|||||||
|
|
||||||
location /api/ {
|
location /api/ {
|
||||||
if ($request_uri ~ ^(.+)/$) {
|
if ($request_uri ~ ^(.+)/$) {
|
||||||
return 301 $1;
|
return 307 $1;
|
||||||
}
|
}
|
||||||
|
|
||||||
proxy_pass http://api:5000/api/;
|
proxy_pass http://api:5000/;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection 'upgrade';
|
proxy_set_header Connection 'upgrade';
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_cache_bypass $http_upgrade;
|
proxy_cache_bypass $http_upgrade;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user