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!
Using the suggested directive:
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:
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 ofseeOther
,movedPermanently
andtempRedirect
. Of course, I'll appreciate an upstream fix for this!