Suggested proxy configuration is incompatible with github authentication
gcampax opened this issue · 0 comments
Using the suggested directive:
ProxyPassReverse /
apache will rewrite the github oauth2 redirect to be a redirect inside the wiki, and eventually hit a redirect loop.
The correct way to set up apache, according to their docs, is:
ProxyPassReverse http://127.0.0.1:5001
This unfortunately breaks all other redirects in gitit.
The solution is for gitit to always use absolute redirects.
I believe it should be possible to modify getWikiBase
to return an absolute URL (combining the rqUri part that it has with "http://", rqHost and the port from the configuration), however I don't know if that's used to generate content that mod_proxy_html would not understand (eg javascript or css) so locally I instead manually modified all instances of seeOther
, movedPermanently
and tempRedirect
. Of course, I'll appreciate an upstream fix for this!