add missing ! to fix #40195

This commit is contained in:
Max Rydahl Andersen 2024-05-06 18:23:42 +02:00
parent 0eb9621954
commit c89c096875
1 changed files with 1 additions and 1 deletions

View File

@ -2350,7 +2350,7 @@ class Filters {
@ServerRequestFilter
public Optional<RestResponse<Void>> getFilter(ContainerRequestContext ctx) {
// only allow GET methods for now
if(ctx.getMethod().equals(HttpMethod.GET)) {
if(!ctx.getMethod().equals(HttpMethod.GET)) {
return Optional.of(RestResponse.status(Response.Status.METHOD_NOT_ALLOWED));
}
return Optional.empty();