3 # Redirect to https if not coming from https && not forwarded from https && not curl nor any health check user-agent
4 RewriteCond %{HTTPS} !=on
5 RewriteCond %{HTTP:X-Forwarded-Proto} !=https
6 RewriteCond %{HTTP_USER_AGENT} !(^kube-probe|^GoogleHC|^curl)
7 RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
9 # Ignore any requests to the assets folder, to avoid the index.html fallback and return 404 there
10 RewriteRule ^assets/ - [L]
12 # Redirect nothing to app
13 RewriteRule ^$ /index.html [NC,L]
16 RewriteRule ^.*?\.git.* /index.html [NC,L]
18 RewriteCond %{REQUEST_FILENAME} -s [OR]
19 RewriteCond %{REQUEST_FILENAME} -l [OR]
20 RewriteCond %{REQUEST_FILENAME} -d
21 RewriteRule ^.*$ - [NC,L]
23 # All shared URLs pages use version with noindex meta tag
24 RewriteRule ^urls\/(.*)$ /urls.html [NC,L]
26 RewriteRule ^(.*) /index.html [NC,L]
28 ErrorDocument 404 /assets/404.html
30 <Files ~ "(index.html|urls.html|version.json)">
33 Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
34 Header set Pragma "no-cache"
35 Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
39 Header set X-Robots-Tag "noindex"
42 # The download service worker gets chunk hash appended to the end of the filename
43 <Files ~ "^downloadSW">
44 Header set Service-Worker-Allowed "/"
45 Header set Service-Worker "script"
48 <IfModule mod_deflate.c>
49 AddOutputFilter INCLUDES;DEFLATE svg