map $arg_internal $redirect {
default 0;
"true" 1;
}
server {
#Swap the following two lines to get the redirect working again
server_name developer-nonprod;
listen 9443 ssl;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_certificate /etc/nginx/ssl/server.cer;
ssl_certificate_key /etc/nginx/ssl/server.key;
client_max_body_size 10M;
location / {
proxy_pass ;
}
location /myapps/ {
if ($redirect = 0) {
return 301 https://controlcenter-$arg_env.xyz/enterprise/myapps/;
}
proxy_pass /;
}
location = /myapps {
if ($redirect = 0) {
return 301 https://controlcenter-$arg_env.xyz/enterprise/myapps/;
}
proxy_pass /;
}
}
When the URL is hit with /?env=test4&**internal=true** getting a blank page and in the browser console getting the message something like this - GET / net::ERR_NAME_NOT_RESOLVED
I am not sure why this was getting invoked as per the condition it should not go inside if block.