Skip to content

Extend CorsDsl with CorsConfigurationSource property #9314

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
IvanPavlov1995 opened this issue Dec 25, 2020 · 4 comments
Closed

Extend CorsDsl with CorsConfigurationSource property #9314

IvanPavlov1995 opened this issue Dec 25, 2020 · 4 comments
Assignees
Labels
in: config An issue in spring-security-config type: enhancement A general enhancement
Milestone

Comments

@IvanPavlov1995
Copy link
Contributor

Expected Behavior

CorsDsl has

var configurationSource: CorsConfigurationSource? = null

similar to ServerCorsDsl

Current Behavior

There is no possibility to set configuration source for cors dsl configuration

Context

I was trying to migrate following code to security dsl:

http.cors().configurationSource { CorsConfiguration().applyPermitDefaultValues() }

but I can't set configuration source in dsl:

class SecurityConfig : WebSecurityConfigurerAdapter() {
    override fun configure(http: HttpSecurity) {
        http {
            cors {
                //can't set configuration source here
            }
        }
    }
}
@IvanPavlov1995 IvanPavlov1995 added status: waiting-for-triage An issue we've not yet triaged type: enhancement A general enhancement labels Dec 25, 2020
@IvanPavlov1995 IvanPavlov1995 changed the title Extend CorsDsl with CorsConfigurationSource Extend CorsDsl with CorsConfigurationSource property Dec 25, 2020
@eleftherias eleftherias self-assigned this Jan 4, 2021
@eleftherias eleftherias added in: config An issue in spring-security-config and removed status: waiting-for-triage An issue we've not yet triaged labels Jan 4, 2021
@eleftherias
Copy link
Contributor

Thanks for reaching out @IvanPavlov1995.

Are you interested in submitting a pull request to add support for the configurationSource in the Kotlin DSL?

@IvanPavlov1995
Copy link
Contributor Author

Yes, I would like to try to do that :)

@eleftherias
Copy link
Contributor

Awesome @IvanPavlov1995!
Feel free to reach out if you have any questions.

@eleftherias
Copy link
Contributor

Closed via f4d78d0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: config An issue in spring-security-config type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants