LP#1883267: Never cache Angular index.html
authorMike Rylander <mrylander@gmail.com>
Fri, 12 Jun 2020 14:36:48 +0000 (10:36 -0400)
committerBill Erickson <berickxx@gmail.com>
Fri, 12 Jun 2020 15:03:10 +0000 (11:03 -0400)
If we cache index.html then clients will be delayed seeing updates in
normal circumstances.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Bill Erickson <berickxx@gmail.com>

Open-ILS/examples/apache_24/eg_vhost.conf.in

index c59d3c2..4953fc9 100644 (file)
@@ -885,9 +885,23 @@ RewriteRule ^/eg2/(.*) https://%{HTTP_HOST}/eg2/en-US/$1 [R=307,L]
 # This is the only required configuration when only using the default locale.
 <Directory "@localstatedir@/web/eg2/en-US">
     FallbackResource /eg2/en-US/index.html
+    <Files "index.html">
+      <IfModule mod_headers.c>
+        Header set Cache-Control "no-cache, no-store, must-revalidate"
+        Header set Pragma "no-cache"
+        Header set Expires 0
+      </IfModule>
+    </Files>
 </Directory>
 
 # fr-CA build
 #<Directory "@localstatedir@/web/eg2/fr-CA">
 #    FallbackResource /eg2/fr-CA/index.html
+#    <Files "index.html">
+#      <IfModule mod_headers.c>
+#        Header set Cache-Control "no-cache, no-store, must-revalidate"
+#        Header set Pragma "no-cache"
+#        Header set Expires 0
+#      </IfModule>
+#    </Files>
 #</Directory>