Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Router.go doesn't take custom context into account. #636

Open
haijian-vaadin opened this issue Jun 7, 2021 · 1 comment
Open

Router.go doesn't take custom context into account. #636

haijian-vaadin opened this issue Jun 7, 2021 · 1 comment
Labels

Comments

@haijian-vaadin
Copy link
Contributor

haijian-vaadin commented Jun 7, 2021

In a Spring Boot application, after setting a custom context root, e.g. in the application.properties file set
server.servlet.context-path=/context

Router.go('') takes the user to the context root, i.e. '/' instead of /context.

To reproduce:
Download a Vaadin Fusion app from https://start.vaadin.com/, set a custom context root as described above. Call Router.go(''), see that it directs the user to localhost:8080 instead of localhost:8080/context.

@knoobie
Copy link

knoobie commented Jun 8, 2021

Keep in mind that this is nothing that can be determined on compile time, but instead can change on "deploy" - often this is changed with an external application.yml/properties depending on the provided server infrastructure, like e.g. / in development and /test or /prod for other environments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants