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

Allow All Headers #118

Open
g-harshit opened this issue Jul 25, 2023 · 0 comments
Open

Allow All Headers #118

g-harshit opened this issue Jul 25, 2023 · 0 comments

Comments

@g-harshit
Copy link

g-harshit commented Jul 25, 2023

corsConfig = cors.DefaultConfig()
corsConfig.AllowOrigins = []string{"http://localhost:3000"}
corsConfig.AllowCredentials = true
corsConfig.AddAllowHeaders("Authorization") // Add any additional headers you need to allow
corsConfig.AddAllowHeaders("UserID")
corsConfig.AddAllowHeaders("UserType")

We are adding one one Headers manually like UserID and UserType. Can we don something that all the headers are allowed by default.

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

No branches or pull requests

1 participant