Remove CORS.

This commit is contained in:
Araozu 2024-05-06 16:04:50 -05:00
parent 07e1f0b679
commit 7df1cdf646
2 changed files with 1 additions and 14 deletions

2
Jenkinsfile vendored
View File

@ -15,7 +15,7 @@ pipeline {
} }
stage("Deploy jar") { stage("Deploy jar") {
steps { steps {
sh "docker compose up -d" sh "docker compose up --build -d"
} }
} }
} }

View File

@ -16,19 +16,6 @@ fun main(args: Array<String>): Unit = io.ktor.server.netty.EngineMain.main(args)
@Suppress("unused") // Referenced in application.conf @Suppress("unused") // Referenced in application.conf
@kotlin.jvm.JvmOverloads @kotlin.jvm.JvmOverloads
fun Application.module(testing: Boolean = false) { fun Application.module(testing: Boolean = false) {
install(CORS) {
method(HttpMethod.Options)
method(HttpMethod.Post)
method(HttpMethod.Put)
method(HttpMethod.Delete)
method(HttpMethod.Patch)
header(HttpHeaders.Authorization)
header(HttpHeaders.Accept)
header(HttpHeaders.ContentType)
allowCredentials = true
anyHost() // @TODO: Don't do this in production if possible. Try to limit it.
}
install(WebSockets) { install(WebSockets) {
pingPeriod = Duration.ofSeconds(15) pingPeriod = Duration.ofSeconds(15)
timeout = Duration.ofSeconds(15) timeout = Duration.ofSeconds(15)