Remove CORS.
This commit is contained in:
parent
07e1f0b679
commit
7df1cdf646
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
@ -15,7 +15,7 @@ pipeline {
|
|||||||
}
|
}
|
||||||
stage("Deploy jar") {
|
stage("Deploy jar") {
|
||||||
steps {
|
steps {
|
||||||
sh "docker compose up -d"
|
sh "docker compose up --build -d"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user