openresty配置如下:
location ~* (/hdpos4-web/Report)
{
content_by_lua_block {
local arg = ngx.req.get_uri_args()
for k,v in pairs(arg) do
ngx.say("[GET ] key:", k, " v:", v)
end
}
}
请求的url:
curl "https:/localhost/hdpos4-web/Report/#report100001?tt=9894&viewType=reportdisplay&viewType=reportdisplay&navigateId=125678&reloadData=true&curTenant=9894&curVendor=100001"
注意url中带有#,请求没有任何响应。
但如果去掉#号后,再请求curl "https:/localhost/hdpos4-web/Report/report100001?tt=9894&viewType=reportdisplay&viewType=reportdisplay&navigateId=125678&reloadData=true&curTenant=9894&curVendor=100001"
响应如下:
[GET ] key:reloadData v:true
[GET ] key:navigateId v:125678
[GET ] key:curVendor v:100001
[GET ] key:curTenant v:9894
[GET ] key:tt v:9894
[GET ] key:viewType v:reportdisplayreportdisplay
请教下各位,现在要获取问号后面的参数,利用openresty能不能实现啊?