Created
December 23, 2015 10:26
-
-
Save haampie/778e907956d253478cf7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
proxy_cache_path /var/www/gravatar-cache levels=1:2 keys_zone=gravatar:8m inactive=24h use_temp_path=off max_size=1000m; | |
proxy_cache_key "$scheme$request_method$host$request_uri"; | |
server { | |
listen 443 ssl http2; | |
server_name [hidden]; | |
access_log off; | |
ssl_certificate [hidden]; | |
ssl_certificate_key [hidden]; | |
location /avatar/ { | |
proxy_cache gravatar; | |
proxy_cache_valid any 7d; | |
proxy_pass https://secure.gravatar.com; | |
proxy_ignore_headers Cache-Control; | |
proxy_hide_header link; | |
proxy_hide_header source-age; | |
proxy_hide_header content-disposition; | |
proxy_hide_header via; | |
proxy_hide_header x-varnish; | |
proxy_hide_header accept-ranges; | |
proxy_hide_header last-modified; | |
expires 365d; | |
add_header Cache-Control public; | |
add_header X-Proxy-Cache $upstream_cache_status; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment