Skip to content

Commit

Permalink
Fix CORS problem in case of OPTION requests on read only topics (kafb…
Browse files Browse the repository at this point in the history
  • Loading branch information
hadisfr committed Sep 21, 2024
1 parent 025c41a commit 985ae15
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ public class ReadOnlyModeFilter implements WebFilter {
@NotNull
@Override
public Mono<Void> filter(ServerWebExchange exchange, @NotNull WebFilterChain chain) {
var isSafeMethod = exchange.getRequest().getMethod() == HttpMethod.GET;
var isSafeMethod =
exchange.getRequest().getMethod() == HttpMethod.GET || exchange.getRequest().getMethod() == HttpMethod.OPTIONS;
if (isSafeMethod) {
return chain.filter(exchange);
}
Expand Down

0 comments on commit 985ae15

Please sign in to comment.