I am trying to set a header for a specific file via my htaccess file in order to give my service worker access to my root. Unfortunately I don't see the header appearing... Perhaps I am not targeting the file (https://www.stefanklokgieters.nl/wp-content/themes/stefanklokgieters/serviceworker.js) correctly?
# Add custom header to single file
<Files "/wp-content/themes/stefanklokgieters/serviceworker.js">
Header set Service-Worker-Allowed "/"
</Files>
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Many thanks in advance!
Cheers, Stefan