You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

14 lines
295 B

error_page 419 = @https;
set $is_https "0";
if ( $scheme ~* "^https") {
set $is_https "${is_https}1";
}
if ( $request_uri ~* "api/v") {
set $is_https "${is_https}1";
}
if ( $is_https = "0" ) {
return 419;
}
location @https {
rewrite ^ https://$http_host$request_uri permanent;
}