From af1ed375e2441ad305ffeb9f0d4357db3ff4ed31 Mon Sep 17 00:00:00 2001 From: Kai Hudalla Date: Tue, 8 Aug 2023 18:28:38 +0200 Subject: [PATCH] Fix usage of deprecated API --- .../http/impl/VertxBasedHttpProtocolAdapter.java | 10 +++++----- .../eclipse/hono/adapter/mqtt/X509AuthHandlerTest.java | 1 + .../adapter/sigfox/impl/SigfoxProtocolAdapter.java | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/adapters/http-base/src/main/java/org/eclipse/hono/adapter/http/impl/VertxBasedHttpProtocolAdapter.java b/adapters/http-base/src/main/java/org/eclipse/hono/adapter/http/impl/VertxBasedHttpProtocolAdapter.java index ac8ff7f483..e576891ea8 100644 --- a/adapters/http-base/src/main/java/org/eclipse/hono/adapter/http/impl/VertxBasedHttpProtocolAdapter.java +++ b/adapters/http-base/src/main/java/org/eclipse/hono/adapter/http/impl/VertxBasedHttpProtocolAdapter.java @@ -151,7 +151,7 @@ private void addTelemetryApiRoutes(final Router router, final Handler dataCorsHandler() { - return CorsHandler.create(getConfig().getCorsAllowedOrigin()) + return CorsHandler.create().addOrigin(getConfig().getCorsAllowedOrigin()) .allowedMethod(HttpMethod.GET) .allowedHeader(Constants.HEADER_TIME_TILL_DISCONNECT) .allowedHeader(HttpHeaders.AUTHORIZATION.toString())