Skip to content

Commit

Permalink
fix(cors): allow Content-Type headers
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewazores committed Feb 24, 2022
1 parent 2753200 commit 2090a18
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
import io.vertx.core.http.HttpMethod;
import io.vertx.ext.web.RoutingContext;
import io.vertx.ext.web.handler.CorsHandler;
import org.apache.http.HttpHeaders;

class CorsEnablingHandler implements RequestHandler {
protected static final String DEV_ORIGIN = "http://localhost:9000";
Expand All @@ -63,8 +64,9 @@ class CorsEnablingHandler implements RequestHandler {
this.env = env;
this.corsHandler =
CorsHandler.create(getOrigin())
.allowedHeader("Authorization")
.allowedHeader(HttpHeaders.AUTHORIZATION)
.allowedHeader(AbstractAuthenticatedRequestHandler.JMX_AUTHORIZATION_HEADER)
.allowedHeader(HttpHeaders.CONTENT_TYPE)
.allowedMethod(HttpMethod.GET)
.allowedMethod(HttpMethod.POST)
.allowedMethod(HttpMethod.PATCH)
Expand Down

0 comments on commit 2090a18

Please sign in to comment.