We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fa12996 commit 6ef2905Copy full SHA for 6ef2905
1 file changed
src/Horse.BasicAuthentication.pas
@@ -85,9 +85,7 @@ procedure Middleware(Req: THorseRequest; Res: THorseResponse; Next: {$IF DEFINED
85
Exit;
86
end;
87
88
- LBasicAuthenticationEncode := '';
89
- if Req.Headers.ContainsKey(Config.Header) then
90
- LBasicAuthenticationEncode := Req.Headers.Items[Config.Header];
+ LBasicAuthenticationEncode := Req.Headers[Config.Header];
91
92
if LBasicAuthenticationEncode.Trim.IsEmpty and not Req.Query.TryGetValue(Config.Header, LBasicAuthenticationEncode) then
93
begin
@@ -188,4 +186,4 @@ function THorseBasicAuthenticationConfig.SkipRoutes: TArray<string>;
188
186
Result := FSkipRoutes;
189
187
190
191
-end.
+end.
0 commit comments