"Proxy error: domain \"gas\" is not proxied. Requested URL: /gas/"
Closed this issue · 4 comments
I've been trying this out but keep coming up against the above error. When running via NPM I see:
Environment variables:
APP__STRIPPED_PATH=/gas (a prefix path added to the original host, which will be removed in the proxy request)
APP__PROXY_DOMAIN= (an optional proxy domain which will be used for client-side requests instead of the current domain)
APP__ENV_NAME=local (should not be local nor test in production)
APP__HOSTS_WHITELIST_REGEX=/.*/ (YAY!! Anyone can use your proxy!)
2021-10-26T18:30:07.999Z Analytics proxy web server is listening on port 80
As the proxy domain is optional, I've not changed that.
Any clues that you could provide as to where I am going wrong, or what i've missed?
Hello! Thanks for reporting this.
Did you make an HTTP request to <host>/gas
? This won't work as it is supposed to work by encoding the path like this: <host>/gas/*(axcninreiqn...)*
. Or what are the reproduction steps?
I think so.
In the default index file I see /*(aaaaaaaaaaaaaaaaaaaaaaaa)*/*(Z3RhZw)*/*(anM)*?id=UA-XXXXXXXX-X
for example.
Putting that in to the browser also shows the Google javascript.
Firing that on the Nginx proxy in front of that following the snippet in the docs with the APP__STRIPPED_PATH
set to /gas
, I get the same error.
"Proxy error: domain \"gas\" is not proxied. Requested URL: /gas/*(aaaaaaaaaaaaaaaaaaaaaaaa)*/*(Z3RhZw)*/*(anM)*?id=UA-XXXXXXXX-X"
With that, I am not sure where the "domain" needs to be set, if at all.
Actually, I think I have solved it. The proxy_pass
seems to be quite picky and needs a trailing slash /
on the end of the URL.
Without it, that error occurs. With, it passes as expected.
Glad to hear! Resolving this issue now.