Skip to content

Commit

Permalink
Revert "EndpointHandler: de-morgan logic for useRoutes"
Browse files Browse the repository at this point in the history
This reverts commit 9543ede.
  • Loading branch information
renerocksai committed Oct 20, 2024
1 parent f946acb commit 425680d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/middleware.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 425680d

Please sign in to comment.