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

fix: add handlers in correct order to handle CORS requests properly #1055

Merged
merged 1 commit into from
Feb 16, 2023

Conversation

marcinfigiel
Copy link
Contributor

@marcinfigiel marcinfigiel commented Jan 24, 2023

Fix the order in which handlers are added to the Negroni stack so the DecisionHandler is last and doesn't intercept CORS preflight requests.

Related issue(s)

#1054

Checklist

  • I have read the contributing guidelines.
  • I have referenced an issue containing the design document if my change
    introduces a new feature.
  • I am following the
    contributing code guidelines.
  • I have read the security policy.
  • I confirm that this pull request does not address a security
    vulnerability. If this pull request addresses a security vulnerability, I
    confirm that I got the approval (please contact
    security@ory.sh) from the maintainers to push
    the changes.
  • I have added tests that prove my fix is effective or that my feature
    works.
  • I have added or changed the documentation.

Further Comments

aeneasr
aeneasr previously approved these changes Feb 14, 2023
@codecov
Copy link

codecov bot commented Feb 14, 2023

Codecov Report

Merging #1055 (3cc1552) into master (7e7d45e) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head 3cc1552 differs from pull request most recent head 37dd8d4. Consider uploading reports for the commit 37dd8d4 to get more accurate results

@@           Coverage Diff           @@
##           master    #1055   +/-   ##
=======================================
  Coverage   77.79%   77.79%           
=======================================
  Files          81       80    -1     
  Lines        3967     3949   -18     
=======================================
- Hits         3086     3072   -14     
+ Misses        600      598    -2     
+ Partials      281      279    -2     
Impacted Files Coverage Δ
cmd/server/server.go 76.50% <100.00%> (ø)
...peline/authn/authenticator_oauth2_introspection.go 80.00% <100.00%> (-0.22%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@vinckr
Copy link
Member

vinckr commented Feb 21, 2023

Hello @marcinfigiel
Congrats on merging your first PR in Ory 🎉 !
Your contribution will soon be helping secure millions of identities around the globe 🌏.
As a small token of appreciation we send our first time contributors a gift package to welcome them to the community.
Please drop me an email and I will forward you the form to claim your Ory swag!

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 this pull request may close these issues.

None yet

3 participants