Skip to content

Commit

Permalink
Disable client side caching of index.html (#50)
Browse files Browse the repository at this point in the history
* Disable client side caching of index.html
* Restart Nginx to apply new config
  • Loading branch information
KraPete authored Dec 2, 2021
1 parent c26e8bf commit 789a695
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
12 changes: 9 additions & 3 deletions configs/etc/nginx/sites-available/default.wb
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,19 @@ server {
#listen [::]:80 default_server ipv6only=on; ## listen for ipv6

root /var/www;
index index.html;

# Make site accessible from http://localhost/
server_name localhost;
try_files $uri $uri/ /index.html;

expires max;
location / {
index index.html;
try_files $uri $uri/ /index.html;
add_header Cache-Control "no-store, no-cache, must-revalidate";
}

location ~* \.(js|jpg|jpeg|gif|png|svg|css)$ {
add_header Cache-Control "max-age=31536000";
}

location /fwupdate/upload {
limit_except POST {
Expand Down
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
wb-configs (2.1.2) stable; urgency=medium

* Disable client side caching of web-interface's index.html

-- Petr Krasnoshchekov <[email protected]> Wed, 01 Dec 2021 18:05:42 +0500

wb-configs (2.1.1) stable; urgency=medium

* remove old legacy sc16is7x2 module load (fix systemd-modules-load.service
Expand Down
2 changes: 2 additions & 0 deletions debian/wb-configs.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,5 @@ if [[ -f /etc/motd ]] && [[ $(sha256sum /etc/motd | head -c 6) == 'a37897' ]]; t
rm -f /etc/motd
ln -s /var/run/motd /etc/motd
fi

deb-systemd-invoke reload nginx || true

0 comments on commit 789a695

Please sign in to comment.