Question about opengamma proxies


#1

I’m trying to put opengamma behind an apache reverse proxy. The following rules seem to work…

However, when I type in the location bar http://localhost/opengamma everything works. However if I link to it from another page on the site it doesn’t. There seems to be code somewhere that generates calls handshake when I open a new window or type something into the location bar, but doesn’t when I call it from the from another web page on the same site.

Any ideas on how to fix this?

> # Proxy to opengamma
> ProxyPass /opengamma/ http://localhost:8080/
> ProxyPassReverse /opengamma/ http://localhost:8080/
> RedirectMatch permanent ^/opengamma$ /opengamma/

> ProxyPass /jax/ http://localhost:8080/jax/
> ProxyPassReverse /jax/ http://localhost:8080/jax/
> ProxyPass /prototype/ http://localhost:8080/prototype/
> ProxyPassReverse /prototype/ http://localhost:8080/prototype/
> ProxyPass /updates/ http://localhost:8080/updates/
> ProxyPassReverse /updates/ http://localhost:8080/updates/

> # Remove backslash since we want to match handshake
> ProxyPass /handshake http://localhost:8080/handshake
> ProxyPassReverse /handshake http://localhost:8080/handshake

#2

OK what seems to happen is that is generates a handshake call if there is no “Referer:” in the header but it doesn’t if there is. Any pointers to where I can see this being done? If someone can point me to the code that is called when “/” is executed I can figure the rest out.


#3

I found the problem which I fixed in pull #83. The OG looks for data from the referer page and this breaks if you call the gui from a non-OG web link.

There is one more problem with proxies is that OG is putting in the hostname in the place where CSS pages are loaded. I think I can figure out how to fix that.


#4

Pull requests merged, thanks.