Strider-CD / strider

Open Source Continuous Integration & Deployment Server
http://strider-cd.github.io/
4.59k stars 433 forks source link

enable relative url, eg hosting on http://myhost/strider/... #596

Open hans-d opened 9 years ago

hans-d commented 9 years ago

Currently all links are relative to the root. Trying to set it up in a more restricted environment with one server (ip) for multiple webapps, where I do not control the dns/htts proxy/firewall/..., windows clients cannot modify the local hosts file (no admin rights), and everything not an ip goes always via an http proxy that cannot reach the server due to firewall restrictions. I can only do redirect based on url prefixes, and would rather not have to modify the response body from the reverse proxy on that server. I saw no setting (yet?) where I can control this.

kfatehi commented 9 years ago

In the current implementation of Strider there is no centralized URL generator like that of the likes of url_for or link_to (from Ruby on Rails) that you can modify for this purpose.

It could be implemented, especially considering that SERVER_NAME must be set anyway and hence this should be the prefix for all URLs.

My suggestion is reverse proxy strider on a subdomain instead of a path if possible.

hans-d commented 9 years ago

I would prefer sibdomain as well, bit currently do not have this option in thia environment. Its mainly about the javascript, stylesheets etc. which currently link to /. Some variable would be nice there. Op 8 okt. 2014 00:16 schreef "Keyvan Fatehi" notifications@github.com:

In the current implementation of Strider there is no centralized URL generator like that of the likes of url_for or link_to (from Ruby on Rails) that you can modify for this purpose.

It could be implemented, especially considering that SERVER_NAME must be set anyway and hence this should be the prefix for all URLs.

My suggestion is reverse proxy strider on a subdomain instead of a path if possible.

— Reply to this email directly or view it on GitHub https://github.com/Strider-CD/strider/issues/596#issuecomment-58272102.

kfatehi commented 9 years ago

Unfortunately I don't have time to hack this out, but if you do, PR will be appreciated and accepted!

hans-d commented 9 years ago

in progress.. currently somewhat lower prio due to issues with the websocket, need to sort that out first.

knownasilya commented 9 years ago

@hans-d what issues with websockets?

kfatehi commented 9 years ago

@knownasilya reverse proxying websockets it still a real issue. I haven't got it to work with haproxy yet and I spent days trying. It's outside of strider's scope though. The best experience I've had with reverse proxying websockets has been with node-http-proxy

kaue commented 9 years ago

@keyvanfatehi Maybe my implementation of HTTP_PROXY env will help you?

mauron85 commented 9 years ago

Only changing absolute paths to relative is sufficient to me. I can change baseUrl with proxy_redirect parameter of nginx.