Open GoogleCodeExporter opened 9 years ago
Sorry, should add, the url is hard coded with the glassfish host and ip address
Original comment by D.H.Bo...@gmail.com
on 3 Feb 2015 at 12:25
Can't you use mod_rewrite here too?
Original comment by James.Mo...@gmail.com
on 3 Feb 2015 at 12:45
When the page is written, the host is hard coded in the img url . mod_rewrite
does not see the content of the page being delivered, just the place where the
file is going to /coming from.
My suspicion is that BranchGraphServlet.java is hard coding the img url:
<code>
public static String asLink(String baseURL, String repository, String objectId,
int numberCommits) {
if (baseURL.length() > 0 && baseURL.charAt(baseURL.length() - 1) == '/') {
baseURL = baseURL.substring(0, baseURL.length() - 1);
}
return baseURL + Constants.BRANCH_GRAPH_PATH + "?r=" + repository
+ (objectId == null ? "" : ("&h=" + objectId))
+ (numberCommits > 0 ? ("&l=" + numberCommits) : "");
}
</code>
Original comment by D.H.Bo...@gmail.com
on 4 Feb 2015 at 9:10
Your suspicions are confirmed, it does hard-code an url.
Original comment by James.Mo...@gmail.com
on 4 Feb 2015 at 12:53
work around:
a2enmod mod_substitute
add the location tag which does the proxying
<location /gitblit>
ProxyPass http://127.0.0.1:8080/gitblit
ProxyPassReverse http://127.0.0.1:8080/gitblit
AddOutputFilterByType SUBSTITUTE text/html
Substitute "s|http://127.0.0.1:8080/|http://<YOUR SERVER HOST>/|i"
</location>
NB change <Your SERVER HOST> to the host name of the world facing server
AND restart apache
Original comment by D.H.Bo...@gmail.com
on 11 Feb 2015 at 7:30
Original issue reported on code.google.com by
D.H.Bo...@gmail.com
on 3 Feb 2015 at 12:24