Skip to content

Commit 62c920e

Browse files
authored
feat: enforce no proxy caching (#788)
1 parent ac15a51 commit 62c920e

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

zigbee2mqtt-proxy/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Zigbee2MQTT Proxy",
3-
"version": "0.2.0",
3+
"version": "0.3.0",
44
"slug": "zigbee2mqtt_proxy",
55
"description": "Proxy for externally running Zigbee2MQTT",
66
"url": "https://github.com/zigbee2mqtt/hassio-zigbee2mqtt/tree/master/zigbee2mqtt-proxy",

zigbee2mqtt-proxy/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22

33
tempio -conf /data/options.json -template /nginx.conf.gtpl -out /tmp/nginx.conf
4-
nginx -T -c /tmp/nginx.conf
4+
nginx -t -c /tmp/nginx.conf
55

66
exec nginx -c /tmp/nginx.conf

zigbee2mqtt-proxy/nginx.conf.gtpl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,13 @@ http {
6161
proxy_send_timeout 86400s;
6262
proxy_max_temp_file_size 0;
6363

64+
proxy_no_cache 1;
65+
proxy_cache_bypass 1;
66+
67+
add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0";
68+
add_header Pragma "no-cache";
69+
add_header Expires 0;
70+
6471
proxy_set_header Accept-Encoding "";
6572
proxy_set_header Connection $connection_upgrade;
6673
proxy_set_header Host $http_host;

0 commit comments

Comments
 (0)