-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgravatar.conf
29 lines (29 loc) · 1007 Bytes
/
gravatar.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Gravatar
location = /robots.txt {
add_header Content-Type text/plain;
return 200 "User-agent: *\nDisallow: /\n";
}
location ~ ^/.*/.*$
{
proxy_pass https://s.gravatar.com;
proxy_hide_header Access-Control-Allow-Origin;
proxy_hide_header Strict-Transport-Security;
proxy_hide_header Cache-Control;
proxy_set_header Host s.gravatar.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Accept-Encoding "";
proxy_ssl_session_reuse off;
proxy_ssl_server_name on;
resolver 8.8.8.8 ipv6=off;
add_header Access-Control-Allow-Origin *;
# Set Nginx Cache
proxy_ignore_headers Set-Cookie Cache-Control expires;
proxy_cache cache_one;
proxy_cache_key $host$uri$is_args$args;
proxy_cache_valid 200 304 301 302 7d;
expires 7d;
add_header AdminCDN-Cache $upstream_cache_status;
add_header Cache-Control no-cache;
}