Allow CORS requests from localhost

This commit is contained in:
William Brawner 2022-11-07 20:57:28 -07:00 committed by GitHub
parent b170d632e4
commit 225bfc6b00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -125,6 +125,7 @@ fun Application.moduleWithDependencies(
}
install(CORS) {
allowHost("twigs.wbrawner.com", listOf("http", "https")) // TODO: Make configurable
allowHost("localhost:4200", listOf("http", "https")) // TODO: Make configurable
allowMethod(HttpMethod.Options)
allowMethod(HttpMethod.Put)
allowMethod(HttpMethod.Delete)