vaadin/flow-and-components-documentation

Vaadin Context Root with Spring Boot and Reverse Proxy

weslowsk opened this issue · 0 comments

In this Vaadin Flow Spring guide, there is a reference for how to configure the context root as something other than the default by using vaadin.urlMapping=/my_mapping/* and modifying the default Spring Boot Application class.
After doing this configuration, most of the resources are served out context root except for one. See this forum post for details.

This only caused a problem for me when trying to put a reverse proxy in front of the Vaadin application with the same context root. I found that the one resource required a rewrite rule unto itself because the Vaadin application tried to serve it out of the root of the reverse proxy.

So, I think it would be appropriate to spell that out as a "note" in the documentation by saying that even though the context root can be "changed", not all of the resources will be served out of that context root and that for situations like mine where a reverse proxy fronted the application, that it will work best by allowing the default context root in the Vaadin application to remain and letting the reverse proxy manage the path, which would equate to the desired context root.