Hello,
I will use Cockpit API on frontend with visible API key (not full access) but i dont want developers to have ability to request my data from anywhere.
On root directory there's an index.php.
You can find:
header("Access-Control-Allow-Origin: *");
Remove the star and put your own domain there.
header("Access-Control-Allow-Origin: example.com");
@6feferonka9 it's possible to configure cors by editing the file config/config.yaml or in Settings > System Settings through the UI:
# Cockpit settings
cors:
allowedOrigins: https://example.com
Most helpful comment
On root directory there's an index.php.
You can find:
header("Access-Control-Allow-Origin: *");Remove the star and put your own domain there.
header("Access-Control-Allow-Origin: example.com");