diff --git a/docker/main/rootfs/usr/local/nginx/conf/nginx.conf b/docker/main/rootfs/usr/local/nginx/conf/nginx.conf index 07907e46a..50a796fdb 100644 --- a/docker/main/rootfs/usr/local/nginx/conf/nginx.conf +++ b/docker/main/rootfs/usr/local/nginx/conf/nginx.conf @@ -190,7 +190,9 @@ http { proxy_cache api_cache; proxy_cache_lock on; proxy_cache_use_stale updating; - proxy_cache_valid any 10s; + proxy_cache_valid any 5s; + proxy_cache_bypass $http_x_cache_bypass; + add_header X-Cache-Status $upstream_cache_status; location /api/stats { access_log off; diff --git a/web/src/api/index.jsx b/web/src/api/index.jsx index 9e4e63b41..d4113ed2b 100644 --- a/web/src/api/index.jsx +++ b/web/src/api/index.jsx @@ -7,6 +7,7 @@ import axios from 'axios'; axios.defaults.baseURL = `${baseUrl}api/`; axios.defaults.headers.common = { 'X-CSRF-TOKEN': 1, + 'X-CACHE-BYPASS': 1, }; export function ApiProvider({ children, options }) {