Page 1 of 1

No internet connection for applications when they are loaded as a file

Posted: Thu Jan 15, 2026 12:52 am
by MyGameTV
Today I wanted to integrate my Ambilight control system and created an application for this purpose, which I use to call an HTML file on the Raspberry Pi. Unfortunately, the file then has no internet connection. More precisely, I'm trying to make API requests, but these aren't reaching the server. The same thing happens when I try to load things from an external source. The Pi has an internet connection via LAN, which I also tested by directly opening the YouTube URL as an application.
Does anyone have any idea what could be causing this or how I can fix it?

Kind regards, Daniel

Re: No internet connection for applications when they are loaded as a file

Posted: Thu Jan 15, 2026 4:01 am
by hudiy
Hello,
This behavior is caused by the Same-Origin Policy: https://developer.mozilla.org/en-US/doc ... gin_policy

To resolve this, you need to run your code via a local HTTP server instead of opening the file directly.