You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to the use of set in regards to 'set $upstream_backend' there's an issue adding rewrite rules in using the ADD_NGINX_LOCATION_CFG as this breaks, for instance adding rewrite ^/path(.*) $1 break to remove the location will cause proxy_pass to break.
Changing the order of the rewrite module directives works, so an ADD_NGINX_LOCATION_CFG set to set $backend_upstream 'https://example.com'; rewrite ^/path(.*) $1 break does work.
While this is a valid workaround I think it's hard to discover - there's a few ways I can see to fix this - either moving set $backend_upstream "$proxy_address"; out of the template and inserting that before ${ADD_NGINX_LOCATION_CFG} in enable_location.sh (ie. so it appears before any added config) or creating a new ADD_REWRITE variable that could be added after the set $backend_upstream directive.
Happy to do a PR for either but I wasn't sure which was preferable.
The text was updated successfully, but these errors were encountered:
Due to the use of set in regards to 'set $upstream_backend' there's an issue adding rewrite rules in using the ADD_NGINX_LOCATION_CFG as this breaks, for instance adding
rewrite ^/path(.*) $1 break
to remove the location will cause proxy_pass to break.Changing the order of the rewrite module directives works, so an ADD_NGINX_LOCATION_CFG set to
set $backend_upstream 'https://example.com'; rewrite ^/path(.*) $1 break
does work.While this is a valid workaround I think it's hard to discover - there's a few ways I can see to fix this - either moving
set $backend_upstream "$proxy_address";
out of the template and inserting that before${ADD_NGINX_LOCATION_CFG}
in enable_location.sh (ie. so it appears before any added config) or creating a new ADD_REWRITE variable that could be added after theset $backend_upstream
directive.Happy to do a PR for either but I wasn't sure which was preferable.
The text was updated successfully, but these errors were encountered: