Skip to content

Commit 6939dff

Browse files
BbIKTOPrtrbt
authored andcommitted
URL template match by extension (me-no-dev#751)
Changes to be committed: modified: src/WebHandlerImpl.h
1 parent a34b0c7 commit 6939dff

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/WebHandlerImpl.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,13 @@ class AsyncCallbackWebHandler: public AsyncWebHandler {
107107
}
108108
} else
109109
#endif
110+
if (_uri.length() && _uri.startsWith("/*.")) {
111+
String uriTemplate = String (_uri);
112+
uriTemplate = uriTemplate.substring(uriTemplate.lastIndexOf("."));
113+
if (!request->url().endsWith(uriTemplate))
114+
return false;
115+
}
116+
else
110117
if (_uri.length() && _uri.endsWith("*")) {
111118
String uriTemplate = String(_uri);
112119
uriTemplate = uriTemplate.substring(0, uriTemplate.length() - 1);

0 commit comments

Comments
 (0)