nginx: add cache to the logs, include accept header in cache key

single-dockerfile
Trammell Hudson 2 years ago
parent b81dd3efcd
commit 27dd1a64bd
  1. 7
      nginx/default.conf
  2. 5
      nginx/etc/nginx.conf

@ -1,5 +1,12 @@
vhost_traffic_status_zone;
log_format cache_log '$server_name $upstream_cache_status - '
'$remote_addr [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" '
'$upstream_response_time $request_time';
access_log /var/log/nginx/access.log cache_log;
server {
listen 80 default_server;

@ -66,6 +66,11 @@ http {
loader_files=200
max_size=200m;
# use the accept header since some activitypub servers
# have both HTML and JSON on the same URI
proxy_cache_key $scheme$proxy_host$uri$is_args$args$http_accept;
##
# Virtual Host Configs
##

Loading…
Cancel
Save