Thursday, November 28, 2013


FYI, Tomcat always does absolute redirects. This can be a problem if you're behind a reverse proxy. Even if you don't write a line of code, under the hood something like this will happen when someone requests a url like which must 302 redirect to

ServletResponse response

And from grepcode we can see that becomes an absolute URL

public void sendRedirect(String location) throws IOException
   String absolute = toAbsolute(location);
   setHeader("Location", absolute);

Hence the need for ProxyPassReverse when your tomcat is behind a front-end apache on a different box.

{ "loggedin": false, "owner": false, "avatar": "", "render": "nothing", "trackingID": "UA-36983794-1", "description": "", "page": { "blogIds": [ 470 ] }, "domain": "", "base": "\/michael", "url": "https:\/\/\/michael\/", "frameworkFiles": "https:\/\/\/michael\/_framework\/_files.4\/", "commonFiles": "https:\/\/\/michael\/_common\/_files.3\/", "mediaFiles": "https:\/\/\/michael\/media\/_files.3\/", "tmdbUrl": "http:\/\/\/", "tmdbPoster": "http:\/\/\/t\/p\/w342" }