I have tomcat running and I'm trying to route to the main app which is localhost:8080/AppName/#/
through nginx. I am able to reach the url by using hostname:8080/AppName/#/
but when I use nginx I get Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986
. This is likely nginx renaming the #
symbol because using nginx to rout to localhost:8080/AppName
works without issue, i just need to then go to hostname/#/
to reach my localhost:8080/AppName/#/
route.
Thus nginx route:
location / {
proxy_pass http://localhost:8080/AppName/#/;
}
Any idea how to get around this #
character issue with nginx and/or tomcat (9)?
The only fix I found didn't work (Tomcat 8 is not able to handle get request with '|' in query parameters?) . I also tried directly encoding it as %23
.