We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 96c62c3 commit 330da10Copy full SHA for 330da10
1 file changed
src/AsyncJson.h
@@ -199,9 +199,15 @@ class AsyncCallbackJsonWebHandler: public AsyncWebHandler {
199
200
if(!(_method & request->method()))
201
return false;
202
-
203
- if(_uri.length() && (_uri != request->url() && !request->url().startsWith(_uri+"/")))
204
- return false;
+
+ if (_uri.length() && _uri.endsWith("*")) {
+ String uriTemplate = String(_uri);
205
+ uriTemplate = uriTemplate.substring(0, uriTemplate.length() - 1);
206
+ if (!request->url().startsWith(uriTemplate))
207
+ return false;
208
+ } else
209
+ if(_uri.length() && (_uri != request->url() && !request->url().startsWith(_uri+"/")))
210
211
212
if ( !request->contentType().equalsIgnoreCase(JSON_MIMETYPE) )
213
0 commit comments