| 1 | Options -Indexes |
| 2 | DirectoryIndex index.php |
| 3 | |
| 4 | # Apache/PHP-FPM strips the Authorization header by default; pass it to PHP for Bearer API keys. |
| 5 | <IfModule mod_rewrite.c> |
| 6 | RewriteEngine On |
| 7 | RewriteCond %{HTTP:Authorization} . |
| 8 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] |
| 9 | </IfModule> |
| 10 | <IfModule mod_setenvif.c> |
| 11 | SetEnvIf Authorization "(.+)" HTTP_AUTHORIZATION=$1 |
| 12 | </IfModule> |
| 13 | <FilesMatch "^(README\.md|router\.php)$"> |
| 14 | Require all denied |
| 15 | </FilesMatch> |
| 16 | <IfModule mod_headers.c> |
| 17 | Header always set X-Content-Type-Options "nosniff" |
| 18 | Header always set Referrer-Policy "same-origin" |
| 19 | </IfModule> |
| 20 | |
| 21 | <IfModule mod_mime.c> |
| 22 | AddType application/manifest+json .webmanifest |
| 23 | </IfModule> |
| 24 | |
| 25 | # Versioned asset URLs (?v=commit) may be cached for a long time. |
| 26 | # sw.js is the exception: a service worker is only updated when this URL is revalidated. |
| 27 | <IfModule mod_headers.c> |
| 28 | <FilesMatch "\.(css|js|png|svg|webp|woff2?)$"> |
| 29 | Header set Cache-Control "public, max-age=31536000, immutable" |
| 30 | </FilesMatch> |
| 31 | <Files "sw.js"> |
| 32 | Header set Cache-Control "no-cache" |
| 33 | </Files> |
| 34 | <Files "manifest.webmanifest"> |
| 35 | Header set Cache-Control "no-cache" |
| 36 | </Files> |
| 37 | </IfModule> |
projects-timfalken-com verhalenboek