GrantGryczan / Miroware

File Garden
https://filegarden.com
MIT License
18 stars 3 forks source link

Streaming audio and webm animation files no longer works (CORS policy issue?) #36

Closed shemetz closed 2 years ago

shemetz commented 2 years ago

Me and my friend have been using miroware.io for about a year now (great website!) for some media file hosting used in Foundry VTT (a virtual tabletop for roleplaying games).

Previously, we could link directly to audio files on the Foundry website and they'd play nicely. For example, this file: https://pipe.miroware.io/607238d9a333fb12a3aca33c/sfx/stone_slide.mp3

However, now when we try to play them it doesn't work and we get console errors:

Access to audio at 'https://pipe.miroware.io/607238d9a333fb12a3aca33c/sfx/stone_slide.mp3' from origin 'http://localhost:30000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

GET https://pipe.miroware.io/607238d9a333fb12a3aca33c/sfx/stone_slide.mp3 net::ERR_FAILED 308

It worked until at least two weeks ago (and I'm guessing it broke recently, as I've seen some commits were pushed in the last few days).

Is this something that should be fixed in the website, or in the way the Foundry client fetches the files?

GrantGryczan commented 2 years ago

Notice that the returned status code is 308, a redirect code! I have begun trying to rebrand Pipe to a new domain. The old domain should redirect to the new one. It seems though that CORS isn't set up properly for those redirects, so I will fix that, but you should switch to the new domain anyway.

Here's the updated URL for that example: https://file.garden/YHI42aMz-xKjrKM8/sfx/stone_slide.mp3

You can update any URL you want using this tool: https://miroware.io/pipe/link-updater/