We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 8d27b53 + 85dc014 commit d3f4479Copy full SHA for d3f4479
src/Horse.BasicAuthentication.pas
@@ -78,8 +78,12 @@ procedure Middleware(Req: THorseRequest; Res: THorseResponse; Next: {$IF DEFINED
78
LBase64String: string;
79
LBasicAuthenticationDecode: TStringList;
80
LIsAuthenticated: Boolean;
81
+ LPathInfo: string;
82
begin
- if MatchText(Req.RawWebRequest.PathInfo, Config.SkipRoutes) then
83
+ LPathInfo := Req.RawWebRequest.PathInfo;
84
+ if LPathInfo = EmptyStr then
85
+ LPathInfo := '/';
86
+ if MatchText(LPathInfo, Config.SkipRoutes) then
87
88
Next();
89
Exit;
@@ -186,4 +190,4 @@ function THorseBasicAuthenticationConfig.SkipRoutes: TArray<string>;
186
190
Result := FSkipRoutes;
187
191
end;
188
192
189
-end.
193
+end.
0 commit comments