1

Apache 2.4 reverse proxy, a url like /call/#/whatever/method is always passed upstream as /call/, which breaks the app that is apparently using the anchor on the server side.

I've tried ProxyPass (both inside and outside of a Location block) with the "nocanon" parameter, and RewriteRule with [NE,P] (that should also imply nocanon).

POC configs are simple enough, similar to these:

RewriteEngine on
RewriteRule "^/(.*)" "http://localhost:8080/$1" [NE,P]

or...

ProxyPass / http://localhost:8080/ nocanon
ProxyPassReverse / http://localhost:8080/

Does anyone have experience with this sort of things who could shed some light on how to include fragments in the upstream URL?

RFC 3986's description of fragment identifiers and their role in URL processing implies that Apache is behaving correctly, so maybe the answer is "you can't do that."

1
  • The application breaks because of something else. If you take a look at the request in browser with developer tools, you will see that fragment is not included in the requests that browser sends. Jun 3, 2017 at 0:10

1 Answer 1

2

You can't do that.

Everything after the # is an anchor, which is never sent to the server at all, it's just used by the browser, either directly by referring to an anchor in the document, or through javascript.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.