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.

17 lines
368 B

  1. error_page 419 = @https;
  2. set $is_https "0";
  3. if ( $scheme ~* "^https") {
  4. set $is_https "${is_https}1";
  5. }
  6. if ( $request_uri ~* "api/v") {
  7. set $is_https "${is_https}1";
  8. }
  9. if ( $request_uri ~* "well-known") {
  10. set $is_https "${is_https}1";
  11. }
  12. if ( $is_https = "0" ) {
  13. return 419;
  14. }
  15. location @https {
  16. rewrite ^ https://$http_host$request_uri permanent;
  17. }