Support running inside an application server.

This PR makes redirect to swagger's index.html to work when running inside application server.