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]
24 RewriteRule ^oauth/callback /oauth.html [L]
26 RewriteRule ^(.*) /index.html [NC,L]
28 ErrorDocument 404 /assets/404.html
30 <Files ~ "(index.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"
38 <IfModule mod_deflate.c>
39 AddOutputFilter INCLUDES;DEFLATE svg