Add OPTIONS to list of allowed CORS methods
This commit is contained in:
parent
5efc9b2b3b
commit
59baf03e22
1 changed files with 7 additions and 2 deletions
|
@ -70,8 +70,13 @@ open class SecurityConfig(
|
|||
with(CorsConfiguration()) {
|
||||
applyPermitDefaultValues()
|
||||
allowedOrigins = environment["twigs.cors.domains"]?.split(",") ?: listOf("*")
|
||||
allowedMethods = listOf(HttpMethod.GET, HttpMethod.POST, HttpMethod.PUT, HttpMethod.DELETE)
|
||||
.map { it.name }
|
||||
allowedMethods = listOf(
|
||||
HttpMethod.GET,
|
||||
HttpMethod.POST,
|
||||
HttpMethod.PUT,
|
||||
HttpMethod.DELETE,
|
||||
HttpMethod.OPTIONS
|
||||
).map { it.name }
|
||||
allowCredentials = true
|
||||
this
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue