Yooooomi / your_spotify

Self hosted Spotify tracking dashboard
GNU General Public License v3.0
3.01k stars 122 forks source link

Set `use-credentials` for manifest file #397

Closed aseevlx closed 4 months ago

aseevlx commented 4 months ago

Short description:

Fixing a problem with inaccessible manifest file when using HTTP basic auth.

Long description:

I am using nginx + basic auth for your_spotify frontend. After the last update, I can no longer see the left sidebar in Chrome. In Safari it works fine.

So on chrome page looks like that (artist and song information are hidden by me):

Screenshot 2024-05-09 at 20 51 01

After a little investigation I found that manifest.json cannot be loaded, and the problem is that it does not use auth headers when making the request:

Screenshot 2024-05-09 at 20 26 30

The situation is described here: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin#example_web_manifest_with_credentials

Thus, this PR fixes this problem.