例子1
location /test_1 {-
return400; }location ^~/test {-
return401; }
如上如果path为/test_1,返回的是400,说明^~优先级并不比普通匹配高
例子2
location /test_1 {-
return400; }location ^~/test {-
return401; }location ~/test {-
return402; }
如上如果path为/test_1,返回的是402,此时^~和普通匹配只记住了最长一个location /test_1,不会阻止正则
如果path为/test,返回401,此时^和普通匹配只记住了最长一个location ^ /test,会阻止正则


