Change error text

This commit is contained in:
2021-02-13 01:43:47 +01:00
parent addb3cddff
commit 55aa512aa5
2 changed files with 8 additions and 6 deletions

View File

@@ -173,7 +173,6 @@ fun Application.module(env: Env = PROD) {
}
install(StatusPages) {
// TODO move to postgresJson lib
exception<CompletionException> { e ->
val parent = e.cause?.cause
if (parent is GenericDatabaseException) {
@@ -199,8 +198,11 @@ fun Application.module(env: Env = PROD) {
method(HttpMethod.Put)
method(HttpMethod.Delete)
header(HttpHeaders.Authorization)
anyHost()
// host("localhost:4200", schemes = listOf("http", "https"))
if (env == PROD) {
host("localhost:4200", schemes = listOf("http", "https"))
} else {
anyHost()
}
allowCredentials = true
allowSameOrigin = true
maxAge = Duration.ofDays(1)