Open konn opened 9 years ago
Logic to borrow is here: https://github.com/fpco/http-reverse-proxy/blob/master/Network/HTTP/ReverseProxy.hs#L280
https://github.com/kazu-yamamoto/wai-app-file-cgi/commit/e98cab0b785d79904da55a6f31464cb79cc0a0d0 is the first try to implement WS reverse proxy.
This works well with your application. But I think more hacks are necessary to give flexibility for paths.
I use Mighttpd2's reverse proxy functionality to assign subdomains to web services.
I'm currently developing service using WebSockets, but it seems that mighty doesn't support websockets connection over the reverse proxy.
Here is minimal example:
Under this setting, when accessing to "ping.example.com" and push "ping" button, the "ping" service raises 500 ISE:
One rather dirty workaround is to specify the port directly; but this doesn't work if session-based access-control is used. So I really need to use WebSockets thru reverse proxy.