CORS Extension
This extension configures specified CORS headers for the endpoints exposed by the REST API (Restful Objects Viewer).
To learn more about CORS, see for example this blog post at www.moesif.com
Configuration
Add the following dependency:
pom.xml
<dependency>
<groupId>org.apache.causeway.extensions</groupId>
<artifactId>causeway-extensions-cors-impl</artifactId>
</dependency>
Also add the following module to your AppManifest
:
AppManifest.java
@Configuration
@Import({
CausewayModuleExtCors.class,
...
})
public class AppManifest {
}
Update the configuration properties:
application.yml
causeway:
extensions:
cors:
allow-credentials: ... (1)
allow-headers: ... (2)
allow-methods: ... (3)
allow-origins: ... (4)
exposed-headers: ... (5)