spring icon indicating copy to clipboard operation
spring copied to clipboard

Connections over reverse proxy stopped working

Open mosi0815 opened this issue 8 years ago • 8 comments

We used 1.0.0beta2 of the vaadin-spring plugin. Everything works as expected. Vaadin talks to: http://cluster/path/UIDL/?v-uiId=0.

Starting with version 1.0.0beta3 it stopped working. The UI loads normally. On interaction Vaadin now tries to send requests to: http://cluster/vaadinServlet/UIDL/?v-uiId=0

I simplified our balancer (apache 2.4) configuration down to: ProxyPass /path/ ajp://server1:8050/

I also tried: ProxyPass /path/ http://server1:8080/

Same result.

If I connect directly to http://server1:8080/both versions work.

mosi0815 avatar May 18 '16 17:05 mosi0815

A tested workaround for this is to use

@SpringBootApplication(exclude = VaadinServletConfiguration.class)

And include the uploaded custom configuration file. (https://github.com/vaadin/spring/files/642305/CustomVaadinServletConfiguration.java.zip) This does not work however if you're application is on root context and you're mapping other paths under it like additional servlets, spring actuator stuff..

This should be fixed at some point, suggestion is to make VaadinServletConfiguration configurable with a deployment time parameter. The custom configuration could map all the Vaadin related paths separately instead of using /* so that any other paths work also.

pleku avatar Dec 09 '16 14:12 pleku

Any news regarding this bug?

mosi0815 avatar Aug 21 '17 14:08 mosi0815

What's the status of getting the workaround into a release?

phillipjohnson avatar Sep 26 '17 19:09 phillipjohnson

Update please, @pleku? Enterprise apps aren't possible currently with latest Vaadin 1.0.0 :-(

cosmocracy avatar Oct 10 '17 17:10 cosmocracy

Sorry for not having a proper fix included for this, but the workaround works (I know enterprise apps that are using that in production).

I cannot unfortunately give any promise when we'll get to looking at a proper fix for this, we currently have other products in focus (CDI-addon and 8.2) for the 8-series. Earliest guesstimate would be late November or December.

pleku avatar Oct 10 '17 17:10 pleku

Thanks for your reply, @pleku. Sorry, I was imprecise. Vaadin not workable for those who host their enterprise apps on a platform like NGINX. As it stands I'd need one server for every app with this workaround, right? (Hoping there's some workaround better than that...will have to order LOTS of SSL certificates for each app otherwise.......)

cosmocracy avatar Oct 10 '17 17:10 cosmocracy

I see. I think the only option then would be to not map any app to the root url to avoid "/*" caching all requests.

Now after refreshing my memory, I recall the fix might not be that big task actually (must be the optimist me talking). The same fix should be made for the Spring add-on for Vaadin Flow too (V10). I'll try to see if we can get squeeze the fix in for that since it is in active development and then port it to V8 version of the add-on too. But that would even yet happen earliest on November.

pleku avatar Oct 10 '17 17:10 pleku

@pleku Thank you for looking into this. I owe you a drink of your choosing! ;-)

cosmocracy avatar Oct 10 '17 20:10 cosmocracy