We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f1ec4f commit 1e029ffCopy full SHA for 1e029ff
src/AsyncJson.h
@@ -201,9 +201,15 @@ class AsyncCallbackJsonWebHandler: public AsyncWebHandler {
201
202
if(!(_method & request->method()))
203
return false;
204
-
205
- if(_uri.length() && (_uri != request->url() && !request->url().startsWith(_uri+"/")))
206
- return false;
+
+ if (_uri.length() && _uri.endsWith("*")) {
+ String uriTemplate = String(_uri);
207
+ uriTemplate = uriTemplate.substring(0, uriTemplate.length() - 1);
208
+ if (!request->url().startsWith(uriTemplate))
209
+ return false;
210
+ } else
211
+ if(_uri.length() && (_uri != request->url() && !request->url().startsWith(_uri+"/")))
212
213
214
if ( !request->contentType().equalsIgnoreCase(JSON_MIMETYPE) )
215
0 commit comments