fix: use https or die
This commit is contained in:
parent
f24d0d7b70
commit
52336332f1
1 changed files with 0 additions and 14 deletions
|
@ -3,19 +3,6 @@ server {
|
||||||
server_name push.ixvd.net;
|
server_name push.ixvd.net;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
# Redirect HTTP to HTTPS, but only for GET topic addresses, since we want
|
|
||||||
# it to work with curl without the annoying https:// prefix
|
|
||||||
set $redirect_https "";
|
|
||||||
if ($request_method = GET) {
|
|
||||||
set $redirect_https "yes";
|
|
||||||
}
|
|
||||||
if ($request_uri ~* "^/([-_a-z0-9]{0,64}$|docs/|static/)") {
|
|
||||||
set $redirect_https "${redirect_https}yes";
|
|
||||||
}
|
|
||||||
if ($redirect_https = "yesyes") {
|
|
||||||
return 302 https://$http_host$request_uri$is_args$query_string;
|
|
||||||
}
|
|
||||||
|
|
||||||
proxy_pass http://ntfy$request_uri;
|
proxy_pass http://ntfy$request_uri;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
|
|
||||||
|
@ -33,6 +20,5 @@ server {
|
||||||
proxy_read_timeout 3m;
|
proxy_read_timeout 3m;
|
||||||
|
|
||||||
client_max_body_size 0; # Stream request body to backend
|
client_max_body_size 0; # Stream request body to backend
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue