From f8c22f637023f2752662308e04909f02e3b0607a Mon Sep 17 00:00:00 2001 From: iliajie Date: Wed, 27 Jul 2022 15:05:18 +0300 Subject: [PATCH] Add `.well-known` location work with proxy enabled sites --- virtual_feature.pl | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/virtual_feature.pl b/virtual_feature.pl index ad5485a..c8d2128 100644 --- a/virtual_feature.pl +++ b/virtual_feature.pl @@ -255,6 +255,18 @@ sub feature_setup &save_directive($server, "fastcgi_param", [ map { { 'words' => $_ } } @params ]); + # Add .well-known location work with proxy enabled sites + my $wploc = { 'name' => 'location', + 'words' => [ '^~', '/.well-known/' ], + 'type' => 1, + 'members' => [ + { 'name' => 'try_files', + 'words' => [ '$uri', '/' ], + }, + ], + }; + &save_directive($server, [ ], [ $wploc ]); + # Add location my $ploc = { 'name' => 'location', 'words' => [ '~', '\.php(/|$)' ],