From 48bfecda7e0d10300ed9f070f436bd18aa0f5100 Mon Sep 17 00:00:00 2001
From: psy <psy@cccv.de>
Date: Sun, 16 Jul 2023 21:02:17 +0200
Subject: [PATCH] add proxy_cache_key

---
 templates/vhost.conf.j2 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/templates/vhost.conf.j2 b/templates/vhost.conf.j2
index d11c55c..0d5614b 100644
--- a/templates/vhost.conf.j2
+++ b/templates/vhost.conf.j2
@@ -53,6 +53,8 @@ server {
 		proxy_cache_lock                        on;
 		proxy_cache_use_stale                   error timeout http_500 http_502 http_503 http_504;
 		proxy_cache_background_update           on;
+		# use actual host instead of proxy host for cache key
+		proxy_cache_key 						$scheme$host$uri$is_args$args;
 		# for debugging purposes, add the following header
 		#add_header X-Cache-Status $upstream_cache_status;
 		{% else %}
-- 
GitLab