mirror of
https://github.com/bensuperpc/infrastructure.git
synced 2025-07-06 09:05:50 +02:00
Update website and disable nginx cache for now
This commit is contained in:
Submodule bensuperpc_website updated: a83b09c814...8e0e433bdf
@ -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 {
|
upstream flask_server {
|
||||||
# ip_hash;
|
# ip_hash;
|
||||||
@ -43,6 +43,24 @@ server {
|
|||||||
|
|
||||||
include /etc/nginx/conf.d/sub/options-ssl-nginx.conf;
|
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 / { try_files $uri @flask_app; }
|
||||||
|
|
||||||
location @flask_app {
|
location @flask_app {
|
||||||
@ -52,19 +70,24 @@ server {
|
|||||||
uwsgi_buffering on;
|
uwsgi_buffering on;
|
||||||
uwsgi_buffers 8 16k;
|
uwsgi_buffers 8 16k;
|
||||||
|
|
||||||
uwsgi_cache UWSGI;
|
#uwsgi_cache_bypass $skip_cache;
|
||||||
uwsgi_cache_valid 200 302 10m;
|
#uwsgi_no_cache $skip_cache;
|
||||||
uwsgi_cache_valid 301 1h;
|
|
||||||
uwsgi_cache_valid any 1m;
|
#uwsgi_cache_valid 200 302 10m;
|
||||||
uwsgi_cache_lock on;
|
#uwsgi_cache_valid 301 1h;
|
||||||
|
#uwsgi_cache_valid any 1m;
|
||||||
|
#uwsgi_cache_lock on;
|
||||||
|
|
||||||
#uwsgi_ignore_headers Vary;
|
#uwsgi_ignore_headers Vary;
|
||||||
#uwsgi_hide_header Vary;
|
#uwsgi_hide_header Vary;
|
||||||
|
|
||||||
uwsgi_ignore_headers Expires Cache-Control Set-Cookie Vary;
|
#uwsgi_ignore_headers Expires Cache-Control Set-Cookie Vary;
|
||||||
uwsgi_hide_header 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
|
# Don't write to accesslog for these files
|
||||||
|
Reference in New Issue
Block a user