Add ContentType header to CORS feature

This commit is contained in:
Hubert Van De Walle 2020-04-12 15:50:16 +02:00
parent 03a190ddd5
commit 5b079999bb

View File

@ -3,9 +3,11 @@ package be.vandewalleh.features
import io.ktor.application.Application
import io.ktor.application.install
import io.ktor.features.CORS
import io.ktor.http.HttpHeaders
fun Application.corsFeature() {
install(CORS) {
anyHost()
header(HttpHeaders.ContentType)
}
}