fix: Allow more necessary HTTP methods for CORS

This commit is contained in:
oSumAtrIX 2024-09-30 17:33:15 +02:00
parent 8ff1bbd41f
commit 080e2e582c
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4

View File

@ -14,6 +14,8 @@ fun Application.configureHTTP() {
val configurationRepository = get<ConfigurationRepository>() val configurationRepository = get<ConfigurationRepository>()
install(CORS) { install(CORS) {
HttpMethod.DefaultMethods.minus(HttpMethod.Options).forEach(::allowMethod)
allowHeader(HttpHeaders.ContentType) allowHeader(HttpHeaders.ContentType)
allowHeader(HttpHeaders.Authorization) allowHeader(HttpHeaders.Authorization)