vite-pwa / nuxt

Zero-config PWA Plugin for Nuxt 3
https://vite-pwa-org.netlify.app/frameworks/nuxt
MIT License
454 stars 22 forks source link

Manifest.webmanifest Failed to load resource: the server responded with a status of 401 #82

Open tzzo opened 1 year ago

tzzo commented 1 year ago

There is an issue when one initially loads the app with Google Chrome browser. When reloading the app the manifest file is loaded correctly.

Either there is an error in the console:

GET https://.../manifest.webmanifest 401 (Unauthorized)
manifest.webmanifest:1 Manifest: Line: 1, column: 1, Syntax error.

Or the manifest.webmanifest contents is this:

<html>
<head><title>401 Authorization Required</title></head>
<body>
<center><h1>401 Authorization Required</h1></center>
<hr><center>nginx/1.25.3</center>
</body>
</html>
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->

Using: @vite-pwa/nuxt: v.0.1.1 vite-plugin-pwa: v0.16.6 nuxt: v3.8.0 Google Chrome: v118.0.5993.117 OS: MacOS 14.0 (23A344)

userquin commented 1 year ago

your site returns 401 for any request

MayaraRMA commented 8 months ago

I think we can use cross-origin, but I don't know how to apply this.

MayaraRMA commented 8 months ago

https://vite-pwa-org.netlify.app/guide/faq.html#web-app-manifest-and-401-status-code-unauthorized, but it doesn't work for me