mirror of
https://github.com/bensuperpc/infrastructure.git
synced 2024-11-10 04:07:26 +01:00
Update website and disable nginx cache for now
This commit is contained in:
parent
dea573b4fd
commit
3a5a73f6a6
@ -1 +1 @@
|
||||
Subproject commit a83b09c8143dc681be72385e7948288c6e005941
|
||||
Subproject commit 8e0e433bdf1969282d89b3bb9f14a722d1bc4acf
|
@ -1,4 +1,4 @@
|
||||
include /etc/nginx/conf.d/sub/cache-uwsgi.conf;
|
||||
#include /etc/nginx/conf.d/sub/cache-uwsgi.conf;
|
||||
|
||||
upstream flask_server {
|
||||
# ip_hash;
|
||||
@ -43,6 +43,24 @@ server {
|
||||
|
||||
include /etc/nginx/conf.d/sub/options-ssl-nginx.conf;
|
||||
|
||||
#set $skip_cache 1;
|
||||
#set $skip_reason "Disabled for now";
|
||||
|
||||
#if ($request_method = POST) {
|
||||
# set $skip_cache 1;
|
||||
# set $skip_reason "POST request";
|
||||
#}
|
||||
|
||||
#if ($request_uri ~* "(/admin/|/logout|/login)") {
|
||||
# set $skip_cache 1;
|
||||
# set $skip_reason "request_uri";
|
||||
#}
|
||||
|
||||
#if ($http_cookie ~* "remember_token") {
|
||||
# set $skip_cache 1;
|
||||
# set $skip_reason "${skip_reason}-http_cookie";
|
||||
#}
|
||||
|
||||
location / { try_files $uri @flask_app; }
|
||||
|
||||
location @flask_app {
|
||||
@ -52,19 +70,24 @@ server {
|
||||
uwsgi_buffering on;
|
||||
uwsgi_buffers 8 16k;
|
||||
|
||||
uwsgi_cache UWSGI;
|
||||
uwsgi_cache_valid 200 302 10m;
|
||||
uwsgi_cache_valid 301 1h;
|
||||
uwsgi_cache_valid any 1m;
|
||||
uwsgi_cache_lock on;
|
||||
#uwsgi_cache_bypass $skip_cache;
|
||||
#uwsgi_no_cache $skip_cache;
|
||||
|
||||
#uwsgi_cache_valid 200 302 10m;
|
||||
#uwsgi_cache_valid 301 1h;
|
||||
#uwsgi_cache_valid any 1m;
|
||||
#uwsgi_cache_lock on;
|
||||
|
||||
#uwsgi_ignore_headers Vary;
|
||||
#uwsgi_hide_header Vary;
|
||||
|
||||
uwsgi_ignore_headers Expires Cache-Control Set-Cookie Vary;
|
||||
uwsgi_hide_header Vary;
|
||||
#uwsgi_ignore_headers Expires Cache-Control Set-Cookie Vary;
|
||||
#uwsgi_hide_header Vary;
|
||||
|
||||
add_header X-cache $upstream_cache_status;
|
||||
#add_header X-cache $upstream_cache_status;
|
||||
#add_header X-cache-reason $skip_reason;
|
||||
|
||||
#uwsgi_cache UWSGI;
|
||||
}
|
||||
|
||||
# Don't write to accesslog for these files
|
||||
|
Loading…
Reference in New Issue
Block a user