新增CORS
This commit is contained in:
parent
24f7726727
commit
21eac9a417
@ -11,7 +11,9 @@ fun Application.configureHTTP() {
|
||||
allowMethod(HttpMethod.Delete)
|
||||
allowMethod(HttpMethod.Patch)
|
||||
allowHeader(HttpHeaders.Authorization)
|
||||
allowHeader("MyCustomHeader")
|
||||
anyHost() // @TODO: Don't do this in production if possible. Try to limit it.
|
||||
allowHeader(HttpHeaders.AccessControlAllowOrigin)
|
||||
anyHost()
|
||||
allowCredentials = true
|
||||
allowNonSimpleContentTypes = true
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user