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.isis.extensions</groupId>
    <artifactId>isis-extensions-cors-impl</artifactId>
</dependency>

Also add the following module to your AppManifest:

AppManifest.java
@Configuration
@Import({
        IsisModuleExtCors.class,
        ...
})
public class AppManifest {
}

Update the configuration properties:

application.yml
isis:
    extensions:
        cors:
            allow-credentials: ...  (1)
            allow-headers: ...      (2)
            allow-methods: ...      (3)
            allow-origins: ...      (4)
            exposed-headers: ...    (5)