-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Mohammad Badar Hashimi edited this page Jan 19, 2020
·
1 revision
<dependency>
<groupId>af.gov.anar.lib</groupId>
<artifactId>anar-lib-cors</artifactId>
<version>${project.version}</version>
</dependency>
Add following properies in your application.properties
anar.cors.allowed-origin=
anar.cors.allowed-method=
anar.cors.allowed-header=default value is * for all of them.
@Autowired
private CorsService corsService;
CorsEntity corsEntity = CorsEntity.builder()
.allowedHeader(allowedOrigin)
.allowedMethod(allowedMethod)
.allowedHeader(allowedHeader)
.build();
corsService.save(corsEntity);
Refer to this repository Wiki section. https://github.com/Anar-Framework/anar-lib-cors/wiki