Skip to content

CORS (Cross-origin resource sharing) Utility Library of Anar Framework

Notifications You must be signed in to change notification settings

Anar-Framework/anar-lib-cors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CORS (Cross Origin Resourcing Sharing) Library of Anar Framework

Usage Guide

		<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.

Adding new Resource Sharing Origin

    @Autowired
    private CorsService corsService;


        CorsEntity corsEntity = CorsEntity.builder()
                .allowedHeader(allowedOrigin)
                .allowedMethod(allowedMethod)
                .allowedHeader(allowedHeader)
                .build();
        corsService.save(corsEntity);

  

Documentation

Refer to this repository Wiki section. https://github.com/Anar-Framework/anar-lib-cors/wiki

About

CORS (Cross-origin resource sharing) Utility Library of Anar Framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages