Reverse Proxy problem With Window and ExternalResource

Hi

I am using the following code to open new Vaadin window in new browser window. It is copied from book of Vaadin.


                getWindow().open(new ExternalResource(window.getURL()),
                        "_blank", 
                        (int) getWidth(), (int) getHeight(),  // Width and height 
                        Window.BORDER_NONE); // No decorations

For some reason the URL in new window points entirely to the local tomcat URL so it seems ProxyPassReverse is not working.

Vaadin version in use is 6.6.3.
The apache httpd server is serving HTTPS and web application container is apachet tomcat.

I am using apache reverse proxy with the following configuration:

Best regards,
Tommi Laukkanen

Hi,

The “window.getURL()” returns the full address to the application as the Vaadin app knows it. Originally it is constructed from the request.

On some app servers it is possible to configure the servlet container to use various X-Forwarded headers instead of the raw request urls. You could check if that is possible on you app server. An other option is to override either getApplicationUrl(HttpServletRequest request) in the Vaadin servlet or getUrl() in you application.

Here are some links that might help:
http://dev.vaadin.com/ticket/6643#comment:16

cheers,
matti

Thank you for reply. Should ProxyPassReverse be able to fix this or is the url somehow encoded when transmitted from application server to browser so that the reverse proxy can not touch it?

Br,
Tommi

Hi,

I’d be surprised if proxypassreverse alone could fix this. AFAIK it just modifies http headers. The url in Window.open() call is transferred in Vaadin UIDL communication (in http payload), which is not filtered.

cheers,
matti

Hi

Does it not also fix HTML links in the content at least? Probably not in other than HTML content though.

Br,
Tommi

Hi,

I’m not sure if I got you question right, but I can make a sophisticated guess that no standard proxy modifies the UIDL communication Vaadin uses. Only the “host page” can be rewritten by proxy to fix broken links.

cheers,
matti