fix: allow cors preflight requests
This commit is contained in:
@@ -33,6 +33,11 @@ public class ApiKeyFilter extends OncePerRequestFilter {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ("OPTIONS".equalsIgnoreCase(request.getMethod())) {
|
||||||
|
filterChain.doFilter(request, response);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
String apiKey = request.getHeader(HEADER);
|
String apiKey = request.getHeader(HEADER);
|
||||||
|
|
||||||
if (apiKey == null || !apiKey.equals(properties.getApiKey())) {
|
if (apiKey == null || !apiKey.equals(properties.getApiKey())) {
|
||||||
|
|||||||
Reference in New Issue
Block a user