fix: proxy Belki routes through k3s nginx
This commit is contained in:
1 parent
057e5c81bd
commit
d06bcb9137
1 file changed
+35
+35
@@ -41,6 +41,41 @@ http {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
|
||||
# Belki calculator runs as a separate k3s web service. Keep the
|
||||
# legacy CatWar static site at /, but forward calculator pages and
|
||||
# their root-relative API calls to the Belki MetalLB service.
|
||||
location = /belki {
|
||||
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_pass http://10.12.0.212/belki;
|
||||
}
|
||||
|
||||
location = /belki/ {
|
||||
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_pass http://10.12.0.212/belki/;
|
||||
}
|
||||
|
||||
location = /admin {
|
||||
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_pass http://10.12.0.212/admin;
|
||||
}
|
||||
|
||||
location ^~ /api/ {
|
||||
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_pass http://10.12.0.212;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ =404;
|
||||
autoindex on;
|
||||
|
||||
Reference in new issue
Block a user