Class CorsSourceProperty

java.lang.Object
best.skn.security.properties.CorsSourceProperty

@Component @ConfigurationProperties("skn.security.cors") public class CorsSourceProperty extends Object
External CORS Configuration Property Class

There is a property called 'skn.security.cors' for externalizing configurations

The sub-properties are:

(1) Origins: it's an array of String under 'skn.security.cors.origins'. It holds all the addresses for the allowed origins.

Since:
2024-03-16
Version:
1.4.0
Author:
SKN Shukhan
Use Case:
Spring Boot Reactive
Dedicated To:
Logno, Atoshi and My Parents
  • Field Details

    • origins

      private String[] origins
      An array of String containing the allowed origins in CORS configuration
      Since:
      v1.0.0
  • Constructor Details

    • CorsSourceProperty

      public CorsSourceProperty(String[] origins)
      Public Constructor with all private properties
      Parameters:
      origins - String Array
      Since:
      v1.4.0
    • CorsSourceProperty

      public CorsSourceProperty()
      Public Constructor with no argument
      Since:
      v1.4.0
  • Method Details

    • getOrigins

      public String[] getOrigins()
      Getter method for `origins` field
      Returns:
      String Array for `origins` field
      Since:
      v1.4.0
    • setOrigins

      public void setOrigins(String[] value)
      Setter method for `origins` field
      Parameters:
      value - String Array for `origins` field
      Since:
      v1.4.0
    • getOriginList

      public List<String> getOriginList()
      Getter method to get a list of CORS allowed origins
      Returns:
      a list of String containing the allowed origins in CORS configuration
      Since:
      v1.0.0