Ajout CORS
This commit is contained in:
parent
b7635a1ac0
commit
0789487841
5 changed files with 65 additions and 15 deletions
|
@ -1,3 +1,16 @@
|
|||
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