diff --git a/src/Horse.JWT.pas b/src/Horse.JWT.pas index c21b561..5c01f89 100644 --- a/src/Horse.JWT.pas +++ b/src/Horse.JWT.pas @@ -111,6 +111,7 @@ procedure Middleware(AHorseRequest: THorseRequest; LValidations: IJOSEConsumer; LJWT: TJOSEContext; {$ENDIF} + LPathInfo: string; LToken, LHeaderNormalize: string; LSession: TObject; LJSON: TJSONObject; @@ -156,7 +157,10 @@ procedure Middleware(AHorseRequest: THorseRequest; end; {$ENDIF} begin - if MatchText(AHorseRequest.RawWebRequest.PathInfo, Config.SkipRoutes) then + LPathInfo := AHorseRequest.RawWebRequest.PathInfo; + if LPathInfo = EmptyStr then + LPathInfo := '/'; + if MatchText(LPathInfo, Config.SkipRoutes) then begin ANext(); Exit;