From 1a37f8847bfa81b54f6cb030a26ab566d9c555b4 Mon Sep 17 00:00:00 2001 From: JBWatenbergScality <75977494+JBWatenbergScality@users.noreply.github.com> Date: Mon, 9 Oct 2023 22:42:03 +0200 Subject: [PATCH] Fix upload/download issue of objects containing a "+" in their key --- nginx.conf.gotempl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nginx.conf.gotempl b/nginx.conf.gotempl index 04b1a20a9..8139b3c09 100644 --- a/nginx.conf.gotempl +++ b/nginx.conf.gotempl @@ -2,6 +2,12 @@ map $request_uri $proxy_uri { "~^/s3/(?.*)$" "/$path"; } +map $proxy_uri $encoded_uri { + ~(.*)\+(.*) $1%2B$2; + default $proxy_uri; +} + + server { listen {{ .Port }}; server_name _; @@ -30,7 +36,7 @@ server { location /s3 { resolver {{ .DNSAddress }}; {{ .AdditionalS3LocationsRules }} - proxy_pass {{ .S3Endpoint }}$proxy_uri; + proxy_pass {{ .S3Endpoint }}$encoded_uri; proxy_redirect off; }