mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-21 22:59:07 +00:00
Refactor Nginx configuration to handle billing redirection***
This commit is contained in:
parent
1ac7c646d5
commit
1b61d7a641
@ -127,21 +127,34 @@ server {
|
||||
|
||||
|
||||
location / {
|
||||
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;
|
||||
if ($billing_enabled = true) {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
proxy_pass http://status-page;
|
||||
if ($billing_enabled != true) {
|
||||
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://status-page;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
location /status-page {
|
||||
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;
|
||||
if ($billing_enabled = true) {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
proxy_pass http://status-page;
|
||||
if ($billing_enabled != true) {
|
||||
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://status-page;
|
||||
}
|
||||
}
|
||||
|
||||
location /status-page-api/ {
|
||||
|
Loading…
Reference in New Issue
Block a user