File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
backend/src/main/java/net/hackyourfuture/coursehub/security Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 1515public class ApiKeyAuthenticationFilter extends OncePerRequestFilter {
1616
1717 private final UserAuthenticationService userAuthenticationService ;
18- private static final String API_KEY_HEADER = "X-API-Key " ;
18+ private static final String AUTHORIZATION_HEADER_KEY = "Authorization " ;
1919
2020 public ApiKeyAuthenticationFilter (UserAuthenticationService userAuthenticationService ) {
2121 this .userAuthenticationService = userAuthenticationService ;
@@ -34,7 +34,7 @@ protected void doFilterInternal(
3434 return ;
3535 }
3636
37- String apiKey = request .getHeader (API_KEY_HEADER );
37+ String apiKey = request .getHeader (AUTHORIZATION_HEADER_KEY );
3838
3939 if (apiKey != null && !apiKey .isEmpty ()) {
4040 // Look up user by API key
You can’t perform that action at this time.
0 commit comments