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