我正在尝试在传入请求的中间匹配正则表达式模式。
我已经验证了我的正则表达式模式适用于 regex101.com。
该文档指出,addHttpRequestHandler
正则表达式将匹配给定正确模式的任何地方。
addHttpRequestHandler('/clinServicesScheduled',
'Scripts/clinServicesScheduled.js', 'clinServicesScheduled');
以上仅在请求开始时匹配。
在请求中间匹配的正确模式是什么?
http://127.0.0.1/data/dashboard/community/communityCode/clinServicesScheduled/month/ ...
http://livedoc.wakanda.org/Global-Application/Application/addHttpRequestHandler.301-636268.en.html
/myPattern
: 拦截任何请求,/myPattern
无论其在字符串中的位置如何。此模式将接受诸如/files/myPattern
、/myPattern.html
和等请求/myPattern/bar.js
。