All Downloads are FREE. Search and download functionalities are using the official Maven repository.

artoria.cors.CorsProperties Maven / Gradle / Ivy

The newest version!
package artoria.cors;

import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.List;

/**
 * Cross-origin resource sharing (CORS) properties.
 * @author Kahle
 */
@Deprecated // TODO: can delete
@ConfigurationProperties("artoria.cors")
public class CorsProperties {
    private Boolean enabled;
    private List configs;

    public Boolean getEnabled() {

        return enabled;
    }

    public void setEnabled(Boolean enabled) {

        this.enabled = enabled;
    }

    public List getConfigs() {

        return configs;
    }

    public void setConfigs(List configs) {

        this.configs = configs;
    }

    public static class CorsConfig {
        private String urlPattern;
        private List allowedOrigins;
        private List allowedHeaders;
        private List exposedHeaders;
        private List allowedMethods;
        private Boolean allowCredentials;
        private Long maxAge;

        public String getUrlPattern() {

            return urlPattern;
        }

        public void setUrlPattern(String urlPattern) {

            this.urlPattern = urlPattern;
        }

        public List getAllowedOrigins() {

            return allowedOrigins;
        }

        public void setAllowedOrigins(List allowedOrigins) {

            this.allowedOrigins = allowedOrigins;
        }

        public List getAllowedHeaders() {

            return allowedHeaders;
        }

        public void setAllowedHeaders(List allowedHeaders) {

            this.allowedHeaders = allowedHeaders;
        }

        public List getExposedHeaders() {

            return exposedHeaders;
        }

        public void setExposedHeaders(List exposedHeaders) {

            this.exposedHeaders = exposedHeaders;
        }

        public List getAllowedMethods() {

            return allowedMethods;
        }

        public void setAllowedMethods(List allowedMethods) {

            this.allowedMethods = allowedMethods;
        }

        public Boolean getAllowCredentials() {

            return allowCredentials;
        }

        public void setAllowCredentials(Boolean allowCredentials) {

            this.allowCredentials = allowCredentials;
        }

        public Long getMaxAge() {

            return maxAge;
        }

        public void setMaxAge(Long maxAge) {

            this.maxAge = maxAge;
        }

    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy