I have Traefik up and running, however I have an app that used to use nginx to proxy pass images from and s3 bucket.
Cant for the life of me figure out the equivalent in traefik.
Here is how its done in nginx:
limit_except GET {
deny all;
}
# only rely on last-modified (which will never change)
proxy_hide_header etag;
proxy_hide_header x-amz-delete-marker;
proxy_hide_header x-amz-id-2;
proxy_hide_header x-amz-request-id;
proxy_hide_header x-amz-version-id;
# heavily cache results locally
set $s3_bucket 'XXX-XXX-XXX';
set $url_full '$1';
proxy_http_version 1.1;
proxy_set_header Get /?accelerate;
proxy_set_header Host $s3_bucket;
proxy_set_header Authorization '';
proxy_hide_header x-amz-id-2;
proxy_hide_header x-amz-request-id;
proxy_hide_header Set-Cookie;
proxy_ignore_headers "Set-Cookie";
proxy_buffering off;
proxy_intercept_errors on;
# annotate response about when it was originally retrieved
add_header x-cache '$upstream_cache_status $upstream_http_date';
# heavily cache results downstream
expires max;
resolver 8.8.8.8 8.8.4.4 valid=300s;
resolver_timeout 10s;
proxy_pass https://$s3_bucket.s3.amazonaws.com;
}