From 04842b6dba9bc4860ffbb99cf3d1295f29e5ca66 Mon Sep 17 00:00:00 2001 From: William Brawner Date: Sat, 18 Dec 2021 08:56:15 -0700 Subject: [PATCH] Fix CORS setup AnyHost * is not allowed in combination with Allow-Credentials, see https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors/CORSNotSupportingCredentials --- app/src/main/kotlin/com/wbrawner/twigs/server/Application.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/wbrawner/twigs/server/Application.kt b/app/src/main/kotlin/com/wbrawner/twigs/server/Application.kt index 940cc54..23b46bd 100644 --- a/app/src/main/kotlin/com/wbrawner/twigs/server/Application.kt +++ b/app/src/main/kotlin/com/wbrawner/twigs/server/Application.kt @@ -108,7 +108,7 @@ fun Application.moduleWithDependencies( }) } install(CORS) { - anyHost() + host("twigs.wbrawner.com") // TODO: Make configurable method(HttpMethod.Options) method(HttpMethod.Put) method(HttpMethod.Delete)