Skip to content

Commit

Permalink
Fix 302-quarkus-vertx-jwt start up by reordering Vert.X Web handler
Browse files Browse the repository at this point in the history
Two days ago Vert.X were [bumped to 4.3.1](quarkusio/quarkus#26294) that caused errors in CI daily runs. According to the [4.3 release notes](https://vertx.io/blog/whats-new-in-vert-x-4-3/#vertx-web) the handler order matters, I also found similar issue [reported here](vert-x3/vertx-web#2182]. Security policy handler `CorsHandler` should be registered after the logging handler.
  • Loading branch information
michalvavrik committed Jun 27, 2022
1 parent 7e348c7 commit 7b1126c
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -87,8 +87,8 @@ void onStop(@Observes ShutdownEvent ev) {

private void addRoute(HttpMethod method, String path, AUTH authEnabled, Handler<RoutingContext> handler) {
Route route = this.router.route(method, path)
.handler(CorsHandler.create("*"))
.handler(LoggerHandler.create());
.handler(LoggerHandler.create())
.handler(CorsHandler.create("*"));

if (method.equals(HttpMethod.POST) || method.equals(HttpMethod.PUT))
route.handler(BodyHandler.create());
Expand Down

0 comments on commit 7b1126c

Please sign in to comment.