From 379b4bafe982a8a8cd3158f0a9fa38a563dbdb57 Mon Sep 17 00:00:00 2001 From: crupest Date: Fri, 13 Nov 2020 16:23:54 +0800 Subject: refactor: Fix #178 . --- BackEnd/Timeline/Auth/MyAuthenticationHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'BackEnd/Timeline/Auth/MyAuthenticationHandler.cs') diff --git a/BackEnd/Timeline/Auth/MyAuthenticationHandler.cs b/BackEnd/Timeline/Auth/MyAuthenticationHandler.cs index b5e22a14..223ff187 100644 --- a/BackEnd/Timeline/Auth/MyAuthenticationHandler.cs +++ b/BackEnd/Timeline/Auth/MyAuthenticationHandler.cs @@ -45,7 +45,7 @@ namespace Timeline.Auth { // check the authorization header string header = Request.Headers[HeaderNames.Authorization]; - if (!string.IsNullOrEmpty(header) && header.StartsWith("Bearer ", StringComparison.InvariantCultureIgnoreCase)) + if (!string.IsNullOrEmpty(header) && header.StartsWith("Bearer ", StringComparison.OrdinalIgnoreCase)) { var token = header.Substring("Bearer ".Length).Trim(); _logger.LogInformation(LogTokenFoundInHeader, token); -- cgit v1.2.3