libeufin

Integration and sandbox testing for FinTech APIs and data formats
Log | Files | Refs | Submodules | README | LICENSE

commit 0ea79a2f9a9ae3c1ee8e0d6250529849e2fd0456
parent 7851f8967d12935f1f2e16f1cc27822f33c0d9ba
Author: Antoine A <>
Date:   Thu,  9 Oct 2025 18:45:57 +0200

bank: fix CORS

Diffstat:
Mcommon/src/main/kotlin/api/server.kt | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/common/src/main/kotlin/api/server.kt b/common/src/main/kotlin/api/server.kt @@ -63,9 +63,10 @@ val ApplicationCall.rawBody: ByteArray get() = attributes.getOrNull(RAW_BODY) ?: fun talerPlugin(logger: Logger): ApplicationPlugin<Unit> { return createApplicationPlugin("TalerPlugin") { onCall { call -> - // Handle cors preflight + // Handle CORS + call.response.header(HttpHeaders.AccessControlAllowOrigin, "*") + // Handle CORS preflight if (call.request.httpMethod == HttpMethod.Options) { - call.response.header(HttpHeaders.AccessControlAllowOrigin, "*") call.response.header(HttpHeaders.AccessControlAllowHeaders, "*") call.response.header(HttpHeaders.AccessControlAllowMethods, "*") call.respond(HttpStatusCode.NoContent)