Skip to content
Snippets Groups Projects
Verified Commit cfda8e68 authored by Sheogorath's avatar Sheogorath :european_castle:
Browse files

Hardening proxy settings: prevent default page from libravatar

This patch should prevent the libravatar default page from being
proxied. As well as preventing libravatar.org from being an entrence for
external JS into the libravatar-nginx domain.
parent 59fbbafc
No related branches found
No related tags found
No related merge requests found
......@@ -72,12 +72,25 @@ server {
proxy_set_header User-Agent: "'Mozilla/5.0 (compatible; Libravatar-nginx/2.2.0; +https://git.shivering-isles.com/shivering-isles/libravatar-nginx)'";
proxy_http_version 1.1;
proxy_pass https://seccdn.libravatar.org;
location /libravatarproxy/avatar/ {
proxy_pass https://seccdn.libravatar.org/avatar/;
proxy_redirect default;
proxy_redirect /avatar/ /libravatarproxy/avatar/;
proxy_redirect /static/img/ /libravatarproxy/static/img/;
proxy_redirect /gravatarproxy/ /libravatarproxy/gravatarproxy/;
}
location /libravatarproxy/static/img/ {
proxy_pass https://seccdn.libravatar.org/static/img/;
proxy_redirect default;
proxy_redirect / /libravatarproxy/;
#proxy_redirect https://seccdn.libravatar.org/avatar/ /libravatarproxy/avatar/;
#proxy_redirect https://seccdn.libravatar.org/static/ /libravatarproxy/static/;
}
location /libravatarproxy/gravatarproxy/ {
proxy_pass https://seccdn.libravatar.org/gravatarproxy/;
proxy_redirect default;
}
}
location @defaultimage {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment