Skip to content

Commit

Permalink
Removing duplicated code block
Browse files Browse the repository at this point in the history
Signed-off-by: Rhuan Rocha <rhuan080@gmail.com>
  • Loading branch information
rhuan080 committed Jun 12, 2023
1 parent 676c3ca commit f5aa62b
Showing 1 changed file with 0 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,6 @@ public void handle(RoutingContext event) {
response.headers().add(HttpHeaders.ACCESS_CONTROL_EXPOSE_HEADERS, exposedHeaders);
}

if (!isConfiguredWithWildcard(corsConfig.exposedHeaders)) {
response.headers().set(HttpHeaders.ACCESS_CONTROL_EXPOSE_HEADERS, this.exposedHeaders);
}

//we check that the actual request matches the allowed methods and headers
if (!isMethodAllowed(request.method())) {
Expand Down Expand Up @@ -226,10 +223,6 @@ private void handlePreflightRequest(RoutingContext event, String requestedHeader
response.headers().add(HttpHeaders.ACCESS_CONTROL_EXPOSE_HEADERS, exposedHeaders);
}

if (!isConfiguredWithWildcard(corsConfig.exposedHeaders)) {
response.headers().set(HttpHeaders.ACCESS_CONTROL_EXPOSE_HEADERS, this.exposedHeaders);
}

}

static boolean isSameOrigin(HttpServerRequest request, String origin) {
Expand Down

0 comments on commit f5aa62b

Please sign in to comment.