File tree Expand file tree Collapse file tree
src/Server/Controllers/Api/v1/Admin Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ public async Task<ActionResult> Action([FromQuery] string rc)
3333 return Problem (
3434 $ "Unknown release channel '{ rc } '; valid are '{ Constants . StableRoute } ' and '{ Constants . CanaryRoute } '", statusCode : 404 ) ;
3535
36- if ( ! AdminEndpointMetadata . AccessToken . EqualsIgnoreCase ( HttpContext . Request . Headers . Authorization ) )
36+ if ( ! AdminEndpointMetadata . AccessToken . Equals ( adminAccessToken ) )
3737 return Unauthorized ( ) ;
3838
3939 var minutesSinceLastRefresh = ( DateTimeOffset . Now - LastRefreshes [ releaseChannel ] ) . TotalMinutes ;
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ public async Task<ActionResult> Increment([FromQuery] string rc)
7171 $ "Unknown release channel '{ rc } '; valid are '{ Constants . StableRoute } ' and '{ Constants . CanaryRoute } '",
7272 statusCode : 404 ) ;
7373
74- if ( ! AdminEndpointMetadata . AccessToken . EqualsIgnoreCase ( HttpContext . Request . Headers . Authorization ) )
74+ if ( ! AdminEndpointMetadata . AccessToken . Equals ( adminAccessToken ) )
7575 return Unauthorized ( ) ;
7676
7777 var versionProviderService = HttpContext . RequestServices
@@ -99,7 +99,7 @@ public async Task<ActionResult> Advance()
9999 statusCode : 418 ) ;
100100
101101
102- if ( ! AdminEndpointMetadata . AccessToken . EqualsIgnoreCase ( HttpContext . Request . Headers . Authorization ) )
102+ if ( ! AdminEndpointMetadata . AccessToken . Equals ( adminAccessToken ) )
103103 return Unauthorized ( ) ;
104104
105105 var versionProviderService = HttpContext . RequestServices
You can’t perform that action at this time.
0 commit comments