ajout CORS
This commit is contained in:
parent
f7abfc4902
commit
d896049932
5 changed files with 68 additions and 20 deletions
|
@ -1 +1,16 @@
|
|||
# https://www.playframework.com/documentation/latest/Configuration
|
||||
play.filters.hosts {
|
||||
allowed = ["."]
|
||||
}
|
||||
|
||||
play.filters.enabled += play.filters.headers.SecurityHeadersFilter
|
||||
|
||||
play.filters.headers {
|
||||
contentSecurityPolicy = "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; frame-ancestors 'self' https://jevalide.ca"
|
||||
}
|
||||
|
||||
play.filters.enabled += "play.filters.cors.CORSFilter"
|
||||
play.filters.cors {
|
||||
allowedOrigins = null // Allow all origins
|
||||
allowedHttpMethods = ["GET", "POST", "PUT", "DELETE", "OPTIONS"]
|
||||
allowedHttpHeaders = ["Accept", "Content-Type"]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue