Cross-Origin Resource Sharing (CORS) is supported through a Java filter and can be enabled in any SeedStack application.
Seed integrates the CORS filter from dzhuvinov software. There is no need to install and configure the filter manually, it is automatically registered by Seed. All filter options can be specified through configuration properties.
CORS can be enabled and configuration as below:
web: cors: # The servlet path mapping on which CORS will be active path: (String) # If true, Cross-Origin-Resource-Sharing (CORS) will be enabled enabled: (boolean) # Allows to specify custom properties to the CORS filter properties: key: (String)
To dump the
web.cors configuration options:
mvn -q -Dargs="web.cors" seedstack:config