An abstraction for providing Actions and Filters that support Cross-Origin Resource Sharing (CORS)
An ActionBuilder that implements Cross-Origin Resource Sharing (CORS)
An ActionBuilder that implements Cross-Origin Resource Sharing (CORS)
Configuration for AbstractCORSPolicy
Configuration for AbstractCORSPolicy
§6.1.2 §6.2.2 Always matching is acceptable since the list of origins can be unbounded.
§6.2.5 Always matching is acceptable since the list of methods can be unbounded.
§6.2.6 Always matching is acceptable since the list of headers can be unbounded.
A Filter that implements Cross-Origin Resource Sharing (CORS)
A Filter that implements Cross-Origin Resource Sharing (CORS)
An ActionBuilder that implements Cross-Origin Resource Sharing (CORS)
An ActionBuilder that implements Cross-Origin Resource Sharing (CORS)
It can be configured to...
CORSActionBuilder { Ok } // an action that uses the application configuration CORSActionBuilder("my-conf-path") { Ok } // an action that uses a subtree of the application configuration val corsConfig: CORSConfig = ... CORSActionBuilder(conf) { Ok } // an action that uses a locally defined configuration
Helpers to build CORS policy configurations
A play.api.mvc.Filter that implements Cross-Origin Resource Sharing (CORS)
A play.api.mvc.Filter that implements Cross-Origin Resource Sharing (CORS)
It can be configured to...
The configuration is as follows:
cors { path.prefixes = ["/myresource", ...] # If left undefined, all paths are filtered allowed { origins = ["http://...", ...] # If left undefined, all origins are allowed http { methods = ["PATCH", ...] # If left undefined, all methods are allowed headers = ["Custom-Header", ...] # If left undefined, all headers are allowed } } exposed.headers = [...] # empty by default supports.credentials = true # true by default preflight.maxage = 3600 # 3600 by default }
A Filter and ActionBuilder that implement Cross-Origin Resource Sharing (CORS)