Why redirect to https://example.com/sw-runtime-resources-precache.js

After I upload Vaadin app on server, app redirecting to https://example.com/sw-runtime-resources-precache.js and I don’t know why. I’am using Vaddin 19.0.0 version.

And there is :

self.additionalManifestEntries = [
{ url: 'icons/icon-144x144.png', revision: '456714318' },
{ url: 'icons/icon-192x192.png', revision: '-1481948590' },
{ url: 'icons/icon-512x512.png', revision: '789785684' },
{ url: 'icons/icon-16x16.png', revision: '1782914653' },
{ url: 'icons/icon-32x32.png', revision: '-208588914' },
{ url: 'manifest.webmanifest', revision: '-1675323940' }
];

Hi,

You probably need to add this URL to the WebSecurity configuration :

@Override
		public void configure(WebSecurity web) {
			web.ignoring().antMatchers("/VAADIN/**", "/favicon.ico", "/robots.txt", "/manifest.webmanifest", "/sw.js",
					"/offline.html", "/icons/**", "/images/**", "/styles/**", "/h2-console/**", "/sw-runtime-resources-precache.js");
		}

Freeman Xearo:
Hi,

You probably need to add this URL to the WebSecurity configuration :

@Override
		public void configure(WebSecurity web) {
			web.ignoring().antMatchers("/VAADIN/**", "/favicon.ico", "/robots.txt", "/manifest.webmanifest", "/sw.js",
					"/offline.html", "/icons/**", "/images/**", "/styles/**", "/h2-console/**", "/sw-runtime-resources-precache.js");
		}

Hi,
Thank you for your solution it works.
I also do stuff from this docs. : [https://vaadin.com/docs-beta/latest/guide/upgrading]
(https://vaadin.com/docs-beta/latest/guide/upgrading)

Yeah, I also tried a few days ago to upgrade to v20.0.0-alpha2 using this doc, but unfortunatly, it seems that one of the spring dependency wasn’t released yet, even an alpha/beta version (VaadinSpringSecurity class).
So I stayed on the v19 :).

Regards,