我的nginx配置中有一个位置,我希望我的客户端保持不变。但是我仍然希望他们能够扩展子路径。
我要定义的内容:
location /root {
access_by_lua_block {
var headers = {};
require(my_script).protect(headers);
}
proxy_pass https://127.0.0.1;
}
像这样的事情给他们
location /root/subpath {
access_by_lua_block {
var headers = {}; //some extra headers
require(my_script).protect(headers);
}
And now run the complete location /root also and then do the proxy_pass of root to 127.0.0.1/root/subpath
}