Skip to content

Commit

Permalink
Merge pull request #384 from zooniverse/downtime-v2
Browse files Browse the repository at this point in the history
downtime redirect v2
  • Loading branch information
lcjohnso authored Nov 20, 2024
2 parents ea38894 + c055d51 commit 742bb57
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions sites/www.zooniverse.org.conf
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,18 @@ server {
# include /etc/nginx/proxy-security-headers.conf;
# }

# DOWNTIME ENABLED
set $status_uri "https://zooniverse-359.freshstatus.io";
# DOWNTIME ENABLED V1
# set $status_uri "https://zooniverse-359.freshstatus.io";
# location / {
# # Put the URL in a variable to force re-resolution of the DNS name
# # Otherwise nginx will cache it indefinitely and it'll break if IPs change
# resolver 1.1.1.1;
# proxy_pass $status_uri;
# proxy_set_header Host $host;
# proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
# }
# DOWNTIME ENABLED V2
location / {
# Put the URL in a variable to force re-resolution of the DNS name
# Otherwise nginx will cache it indefinitely and it'll break if IPs change
resolver 1.1.1.1;
proxy_pass $status_uri;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
return 301 "https://status.zooniverse.org";
}
}

0 comments on commit 742bb57

Please sign in to comment.