I have this problem where I can not load local audio files into an <audio>
src
attribute when using livereload
because a CORS issue is happening. It works correctly when no livereload
is used.
Example:
I use
"http://localhost:8080/_file_/storage/emulated/0/Download/01 A Girl Like You.mp3"
and it throws
Access to audio at 'http://localhost:8080/_file_/storage/emulated/0/Download/01%20%20A%20Girl%20Like%20You.mp3' from origin 'http://localhost:8100' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
I have tried set a proxy in ionic.config.json
{
"path": "/livereload/",
"proxyUrl": "http://localhost:8080/"
}
and
{
"path": "/livereload/",
"proxyUrl": "http://localhost:8100/"
}
it does not work.
Does anybody knows how to do this?