smart proxy: do not redirect when given argument
?redirect=false
This commit is contained in:
parent
2823033e67
commit
5db44e68e9
1 changed files with 7 additions and 1 deletions
|
@ -186,6 +186,12 @@ class ProxyAutomation(TerraformAutomation):
|
||||||
listen 443 ssl;
|
listen 443 ssl;
|
||||||
server_name origin-{{ origin.id }}.{{ provider }}.smart.{{ smart_zone[:-1] }};
|
server_name origin-{{ origin.id }}.{{ provider }}.smart.{{ smart_zone[:-1] }};
|
||||||
if ($redirect_country = yes) {
|
if ($redirect_country = yes) {
|
||||||
|
set $redirect_test 1;
|
||||||
|
}
|
||||||
|
if ($arg_redirect = "false") {
|
||||||
|
set $redirect_test 0;
|
||||||
|
}
|
||||||
|
if ($redirect_test = 1) {
|
||||||
rewrite ^ https://{{ origin.domain_name }}$request_uri? break;
|
rewrite ^ https://{{ origin.domain_name }}$request_uri? break;
|
||||||
}
|
}
|
||||||
location / {
|
location / {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue