-
-
Notifications
You must be signed in to change notification settings - Fork 150
FE: Closes #535, allowing to configure cors through spring properties #574
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi aditya-baldwa! 👋
Welcome, and thank you for opening your first PR in the repo!
Please wait for triaging by our maintainers.
Please take a look at our contributing guide.
23828bd
to
cbc8743
Compare
# Conflicts: # api/src/main/java/io/kafbat/ui/config/CorsGlobalConfiguration.java # api/src/main/java/io/kafbat/ui/config/CorsProperties.java # api/src/main/resources/application.yml
allowed-origins: "*" | ||
allowed-methods: "GET, PUT, POST, DELETE, OPTIONS" | ||
allowed-headers: "Content-Type" | ||
allow-credentials: "true" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*
for allow-origin can not be used simultaneously with allow-credentials
set to true
. I suggest keeping the configuration as it is right now for backward compatibility and using the new approach if either of the properties (cors.*
) is set (not null) or introducing even a new properly like (cors.enabled
). What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think allowed-origins should be null by default and if it is null we could pass request.getHeaders().getOrigin(). This will keep backward compatibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aditya-baldwa hi, could you address this please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Haarolean, yes, will check on it
What changes did you make? (Give an overview)
Resoves #535
Is there anything you'd like reviewers to focus on?
How Has This Been Tested? (put an "x" (case-sensitive!) next to an item)
Checklist (put an "x" (case-sensitive!) next to all the items, otherwise the build will fail)
Check out Contributing and Code of Conduct
A picture of a cute animal (not mandatory but encouraged)
