Allow CORS requests from localhost
This commit is contained in:
parent
b170d632e4
commit
225bfc6b00
1 changed files with 2 additions and 1 deletions
|
@ -125,6 +125,7 @@ fun Application.moduleWithDependencies(
|
||||||
}
|
}
|
||||||
install(CORS) {
|
install(CORS) {
|
||||||
allowHost("twigs.wbrawner.com", listOf("http", "https")) // TODO: Make configurable
|
allowHost("twigs.wbrawner.com", listOf("http", "https")) // TODO: Make configurable
|
||||||
|
allowHost("localhost:4200", listOf("http", "https")) // TODO: Make configurable
|
||||||
allowMethod(HttpMethod.Options)
|
allowMethod(HttpMethod.Options)
|
||||||
allowMethod(HttpMethod.Put)
|
allowMethod(HttpMethod.Put)
|
||||||
allowMethod(HttpMethod.Delete)
|
allowMethod(HttpMethod.Delete)
|
||||||
|
@ -184,4 +185,4 @@ fun Application.moduleWithDependencies(
|
||||||
|
|
||||||
interface Job {
|
interface Job {
|
||||||
suspend fun run()
|
suspend fun run()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue