Is there a simple way to enable CORS (cross origin resource sharing) in kirby itself? I want to share some css between two hosts
CORS requires the Access-Control-*
headers. You can set these from PHP (for example in your Kirby config.php
) using the header
function.
But since you want to share static resources like CSS, the PHP configuration won’t apply here. You will need to set the header directly from Apache, which you can do from the .htaccess
or Apache configuration.