Skip to content

Commit

Permalink
fix: expect free query auth token to start with "Bearer "
Browse files Browse the repository at this point in the history
  • Loading branch information
Jannis committed Oct 25, 2023
1 parent c44d47e commit 1c71d49
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion common/src/indexer_service/http/request_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@ where
} else if state.config.server.free_query_auth_token.is_some()
&& state.config.server.free_query_auth_token
!= headers
.get("free-query-auth-token")
.get("authorization")
.and_then(|v| v.to_str().ok())
.and_then(|s| s.strip_prefix("Bearer "))
.map(|s| s.to_string())
{
return Err(IndexerServiceError::Unauthorized);
Expand Down

0 comments on commit 1c71d49

Please sign in to comment.