-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Make CORS work for oauth2 handlers #28184
Conversation
026cb00
to
2d2491c
Compare
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 don't quite understand, why do we need these routes?
Are they required by OAuth?
Because the "OPTIONS" is a separate request before "POST" (for CORS) |
Fix go-gitea#25473 Although there was `m.Post("/#/oauth/access_token", CorsHandler()...`, it never really worked, because it still lacks the "OPTIONS" handler.
* giteaofficial/main: Use db.Find instead of writing methods for every object (go-gitea#28084) Edit Discord Badge (go-gitea#28188) Use restricted sanitizer for repository description (go-gitea#28141) Use full width for PR comparison (go-gitea#28182) Make CORS work for oauth2 handlers (go-gitea#28184) Fix missing buttons (go-gitea#28179)
Still observing a similar problem:
Server side log: Any help would be appreciated. |
Because This PR only fixes the It could simply add a new line |
Follow go-gitea#28184 Follow go-gitea#28515 Fix problem with 405 method not allowed for CORS wrt OIDC
Backport #28583 by @morphelinho Follow #28184 Follow #28515 Fix problem with 405 method not allowed for CORS wrt OIDC Co-authored-by: morphelinho <morphelinho@users.noreply.github.com>
Follow go-gitea#28184 Follow go-gitea#28515 Fix problem with 405 method not allowed for CORS wrt OIDC
Fix go-gitea#25473 Although there was `m.Post("/#/oauth/access_token", CorsHandler()...`, it never really worked, because it still lacks the "OPTIONS" handler.
Follow go-gitea#28184 Follow go-gitea#28515 Fix problem with 405 method not allowed for CORS wrt OIDC
Fix go-gitea#25473 Although there was `m.Post("/#/oauth/access_token", CorsHandler()...`, it never really worked, because it still lacks the "OPTIONS" handler.
Follow go-gitea#28184 Follow go-gitea#28515 Fix problem with 405 method not allowed for CORS wrt OIDC
Fix #25473
Although there was
m.Post("/#/oauth/access_token", CorsHandler() ...
,it never really worked, because it still lacks the "OPTIONS" handler.After the fix:
ps: I haven't fully tested the "oauth2 cors client", we can make further fixes if there are still problems.