Skip to content

Commit

Permalink
Fix upload/download issue of objects containing a "+" in their key
Browse files Browse the repository at this point in the history
  • Loading branch information
JBWatenbergScality authored Oct 9, 2023
1 parent 5fc8476 commit 1a37f88
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion nginx.conf.gotempl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ map $request_uri $proxy_uri {
"~^/s3/(?<path>.*)$" "/$path";
}

map $proxy_uri $encoded_uri {
~(.*)\+(.*) $1%2B$2;
default $proxy_uri;
}


server {
listen {{ .Port }};
server_name _;
Expand Down Expand Up @@ -30,7 +36,7 @@ server {
location /s3 {
resolver {{ .DNSAddress }};
{{ .AdditionalS3LocationsRules }}
proxy_pass {{ .S3Endpoint }}$proxy_uri;
proxy_pass {{ .S3Endpoint }}$encoded_uri;
proxy_redirect off;
}

Expand Down

0 comments on commit 1a37f88

Please sign in to comment.