Some of the customers of the e-commerce website that I manage are behind a ZScaler firewall, and it appends garbage query params to all outgoing requests; so when my website makes a HTTP GET request like:
/api/cartinventoryitems?cartsummaryid=eq.1234
It comes through to nginx as:
/api/cartinventoryitems?cartsummaryid=eq.1234&_sm_byp=iVVJvVj6nqJDqQj5
The endpoint behind my /api/
location does not like this, so I am trying to strip it out.
Right now, I am trying to use rewrite
at the head of my server
block, like so:
server {
listen 80 default_server;
listen [::]:80 default_server;
rewrite ^(.*)([&?]_sm_byp=\w+) $1 last;
...
}
But it doesn't seem to be working. Any help would be appreciated.