Since a little change in my apache configuration I am always redirect to the pwa offline page after a login. When I remove the “offline.html” in the URL I can access normally to the application.
BTW is there any good practice with “apache” configuration to “tomcat” with a vaadin pwa app ?
Moreover it seems that even if the sw.js worker is load with https, it attempts to load the app through http wich provokes somes errors in google chrome.
Actually I also have the same problem. But it is not always, just for some users.
After logging in, the user is redirected to the offline page. When removing the offline.html from the URL, the application is shown.
Using Vaadin 14.3.0 with Spring Boot 2.3.1.
This happens in Chrome and also Firefox. I haven’t tested in Edge(ium).
Does anybody know which Vaadin classes are involved when the offline page is shown so I have an entry point for debugging why it is doing the redirect?
I’ve simply forgot to add "/offline.html", to SecurityConfiguration class. adding this entry, my issue got resolved.
Also, for getting the best results I encourage everyone to follow the official tutorial provided by Vaadin team at [here]
(https://vaadin.com/docs/v14/flow/tutorials/in-depth-course/login-and-authentication).
Your configure method in this class should look like below.
@Override
public void configure(WebSecurity web) {
web.ignoring().antMatchers(
// Vaadin Flow static resources
"/VAADIN/**",
// the standard favicon URI
"/favicon.ico",
// the robots exclusion standard
"/robots.txt",
// web application manifest
"/manifest.webmanifest",
"/sw.js",
"/offline.html",
// icons and images
"/icons/**",
"/images/**",
"/img/**",
"/videos/**",
// (development mode) static resources
"/frontend/**",
// (development mode) webjars
"/webjars/**",
// (production mode) static resources
"/frontend-es5/**", "/frontend-es6/**");
}