PingLing
Posts: 7
Joined: Sun Mar 01, 2026 4:29 pm

CORS issues

Hi, there seems to be something wrong with the config. I get hundreds of these on the console (W10, MS Edge / Firefox) and no images are shown:

Access to image at 'http://berryaudio.local:8080/images/loc ... 2856dd.jpg' from origin 'http://berryaudio.local' has been blocked by CORS policy: The request client is not a secure context and the resource is in more-private address space `local`.

Is it something I should adjust on my end? Only once I saw the images, no idea why. Playback itself works fine.
User avatar
varungujjar
Site Admin
Posts: 18
Joined: Thu Nov 20, 2025 5:50 pm

Re: CORS issues

Hi you should just use the link http://berryaudio.local

PS: your image attachment is missing :)

Let me know
PingLing
Posts: 7
Joined: Sun Mar 01, 2026 4:29 pm

Re: CORS issues

Yes, that's how I'm accessing it. See screenshots from my phone (Chrome, Android 16) - it's exactly as on my PC.

https://www.flickr.com/gp/piotr_ingling/2yj3Fus014

https://www.flickr.com/gp/piotr_ingling/9mz944Jmud
PingLing
Posts: 7
Joined: Sun Mar 01, 2026 4:29 pm

Re: CORS issues

It seems that all is fine when I access http://berryaudio.local:8080 - because the images are loaded from urls with 8080 port. I'm using the unmodified config and I don't see any configuration option to change it from the UI.
User avatar
varungujjar
Site Admin
Posts: 18
Joined: Thu Nov 20, 2025 5:50 pm

Re: CORS issues

PingLing wrote: Mon Mar 02, 2026 10:51 pm It seems that all is fine when I access http://berryaudio.local:8080 - because the images are loaded from urls with 8080 port. I'm using the unmodified config and I don't see any configuration option to change it from the UI.
hmm its strange considering that all images are served from berryaudio.local directly instead of port. However I will just burn a fresh image to another pi and test this tommorow and update here.
PingLing
Posts: 7
Joined: Sun Mar 01, 2026 4:29 pm

Re: CORS issues

The web.py explicitly sets the port to 8080 :-)

Code: Select all

async def run_server(self):
        host = "0.0.0.0"
        port = 8080
User avatar
varungujjar
Site Admin
Posts: 18
Joined: Thu Nov 20, 2025 5:50 pm

Re: CORS issues

So running webserver on 80 requires root privileges which is not good hence the use of port 8080 which is then proxied using nginx
PingLing
Posts: 7
Joined: Sun Mar 01, 2026 4:29 pm

Re: CORS issues

varungujjar wrote: Mon Mar 02, 2026 11:23 pm hmm its strange considering that all images are served from berryaudio.local directly instead of port.
It's not what the console says :-) In my case all images are loaded from :8080. And, for CORS policy, the berryaudio.local and berryaudio.local:8080 are not the same origin, hence the images don't load.

When I access from berryaudio.local
https://www.flickr.com/gp/piotr_ingling/3q7h03LXF4
https://www.flickr.com/gp/piotr_ingling/b13D03c70r

When I access from berryaudio.local:8080
https://www.flickr.com/gp/piotr_ingling/626R6Kr300
https://www.flickr.com/gp/piotr_ingling/NBar8T4E7D
User avatar
varungujjar
Site Admin
Posts: 18
Joined: Thu Nov 20, 2025 5:50 pm

Re: CORS issues

Ah understood!, I will get back to you with a solution in next 2 days. Will server the images to nginx proxy so they would be seen at berryaudio.local/images and not berryaudio.local:8080

Return to “Help & Support”