mirror of
https://github.com/me-no-dev/ESPAsyncWebServer.git
synced 2025-08-04 21:24:40 +02:00
URL template match by extension (#751)
Changes to be committed: modified: src/WebHandlerImpl.h
This commit is contained in:
@@ -105,6 +105,13 @@ class AsyncCallbackWebHandler: public AsyncWebHandler {
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
if (_uri.length() && _uri.startsWith("/*.")) {
|
||||
String uriTemplate = String (_uri);
|
||||
uriTemplate = uriTemplate.substring(uriTemplate.lastIndexOf("."));
|
||||
if (!request->url().endsWith(uriTemplate))
|
||||
return false;
|
||||
}
|
||||
else
|
||||
if (_uri.length() && _uri.endsWith("*")) {
|
||||
String uriTemplate = String(_uri);
|
||||
uriTemplate = uriTemplate.substring(0, uriTemplate.length() - 1);
|
||||
|
Reference in New Issue
Block a user