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

vaadin-boot-example-gradle doesn't work without trailing slash in the URL #2

Closed
mvysny opened this issue Feb 5, 2023 · 6 comments
Closed
Assignees
Labels
bug Something isn't working waiting for upstream Needs to be fixed upstream

Comments

@mvysny
Copy link
Owner

mvysny commented Feb 5, 2023

@mvysny mvysny self-assigned this Feb 5, 2023
@mvysny
Copy link
Owner Author

mvysny commented Feb 5, 2023

Network traffic from app with the trailing slash:

Screenshot from 2023-02-05 08-02-29

Network traffic from app without the trailing slash:

image

@mvysny
Copy link
Owner Author

mvysny commented Feb 5, 2023

The problem is that in the latter case, the request for indexhtml.js goes to http://localhost/VAADIN/build/indexhtml.2ae6b87b.js while it should go to http://localhost/vaadin-boot-example-gradle/VAADIN/build/indexhtml.2ae6b87b.js

@mvysny
Copy link
Owner Author

mvysny commented Feb 5, 2023

Easiest workaround is to redirect to the URL with the trailing /

@mvysny
Copy link
Owner Author

mvysny commented Feb 5, 2023

Upstream ticket: vaadin/flow#15399

@mvysny mvysny added bug Something isn't working waiting for upstream Needs to be fixed upstream labels Feb 5, 2023
@mvysny
Copy link
Owner Author

mvysny commented Feb 5, 2023

The problem is that the index.html file links to vaadin js bootstrap via ./VAADIN/ relative URL which resolves to http://localhost/VAADIN/build/indexhtml.2ae6b87b.js when the request URL is
http://localhost/vaadin-boot-example-gradle (no trailing slash).

Possible solutions:

  1. Vaadin redirects to url with trailing slash
  2. The relative URL is generated in a different way when the url doesn't end with slash.
  3. Something else :)
  4. Modify reverse proxy to perform the redirect

@mvysny
Copy link
Owner Author

mvysny commented Feb 8, 2023

Workaround is to add a reverse-proxy rule which redirects to a path ending with a slash /: kubernetes/ingress-nginx#646 (comment)

@mvysny mvysny closed this as completed in 055090b Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working waiting for upstream Needs to be fixed upstream
Projects
None yet
Development

No branches or pull requests

1 participant