1
0
Fork 0
mirror of https://github.com/zigzap/zap.git synced 2025-10-20 15:14:08 +00:00

Revert "EndpointHandler: de-morgan logic for useRoutes"

This reverts commit 9543ede15f.
This commit is contained in:
Rene Schallner 2024-10-20 23:30:16 +02:00
parent dfdb2db4ce
commit ae5c927833
No known key found for this signature in database

View file

@ -99,7 +99,7 @@ pub fn EndpointHandler(comptime HandlerType: anytype, comptime ContextType: anyt
pub fn onRequest(handler: *HandlerType, r: zap.Request, context: *ContextType) bool {
const self: *Self = @fieldParentPtr("handler", handler);
r.setUserContext(context);
if (self.options.checkPath and
if (!self.options.checkPath or
std.mem.startsWith(u8, r.path orelse "", self.endpoint.settings.path))
{
self.endpoint.onRequest(r);