vaadin / router

Small and powerful client-side router for Web Components. Framework-agnostic.
https://vaadin.com/router
Apache License 2.0
415 stars 51 forks source link

Handling Client Side Routing When Hosting Vaadin Lit project on AWS S3 #880

Open arulselvan opened 9 months ago

arulselvan commented 9 months ago

I've deployed the Vaadin app in AWS S3, My current objective is to ensure that when I refresh the page, the child route refreshes without redirecting back to the home page.

To handle this in AWS S3, I've implemented conditional redirects for 404 errors. The configuration is as follows:

[ { "Condition": { "HttpErrorCodeReturnedEquals": "404", "KeyPrefixEquals": "ld" }, "Redirect": { "HostName": "[dev.mydomain.in](http://dev.mydomain.in/)", "Protocol": "https", "ReplaceKeyPrefixWith": "ld#!/" } } ]

This setup effectively redirects any 404 errors with the specified key prefix to the designated hostname and protocol, replacing the key prefix with "ld#!/"

Now, my question is: does Vaadin support hash-based routing to further enhance this setup?

Thank you in advance for any insights or suggestions!