Skip to content

Instantly share code, notes, and snippets.

@mkorkmaz
Created November 2, 2018 14:47
Show Gist options
  • Save mkorkmaz/d28eec9441fc0c7c9b4443c98ede1401 to your computer and use it in GitHub Desktop.
Save mkorkmaz/d28eec9441fc0c7c9b4443c98ede1401 to your computer and use it in GitHub Desktop.
server {
listen 80;
listen [::]:80;
server_name cdn-images.example.com;
server_tokens off;
location / {
rewrite ^/(.*)/subfolder/(.*)$ /images/$1/anothersubfolder/anothersubfolder/$2;
proxy_pass https://my-bucketname.ams3.digitaloceanspaces.com/;
proxy_hide_header Strict-Transport-Security;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment