Skip to content
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

Configuration with no allowed origin sets allow credentials to true #13

Closed
blcham opened this issue Nov 22, 2023 · 0 comments · Fixed by #14
Closed

Configuration with no allowed origin sets allow credentials to true #13

blcham opened this issue Nov 22, 2023 · 0 comments · Fixed by #14

Comments

@blcham
Copy link

blcham commented Nov 22, 2023

This happens as the following if section is always executed:

        allowedOrigins.addAll(Arrays.asList(allowedOriginsConfig.split(",")));
        if (!allowedOrigins.isEmpty()) {
            corsConfig.setAllowedOrigins(allowedOrigins);
            corsConfig.setAllowCredentials(true);
        }

After the execution, the allowedOrigin list always contains at least one element. If allowedOriginsConfig == ""
then at least an empty string (i.e.,"").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant