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: cors options pass by promise #130

Merged
merged 4 commits into from
May 7, 2021
Merged

fix: cors options pass by promise #130

merged 4 commits into from
May 7, 2021

Conversation

climba03003
Copy link
Member

Resolve: #129

Changes:

  • fix cors options pass by promise
  • update typings
  • update readme

Checklist

@coveralls
Copy link

Pull Request Test Coverage Report for Build 819366967

  • 0 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 795457674: 0.0%
Covered Lines: 94
Relevant Lines: 94

💛 - Coveralls

@coveralls
Copy link

Pull Request Test Coverage Report for Build 819366967

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 795457674: 0.0%
Covered Lines: 94
Relevant Lines: 94

💛 - Coveralls

@coveralls
Copy link

coveralls commented May 7, 2021

Pull Request Test Coverage Report for Build 819383836

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 795457674: 0.0%
Covered Lines: 94
Relevant Lines: 94

💛 - Coveralls

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina
Copy link
Member

mcollina commented May 7, 2021

I didn't understand the issue linked, I'm trusting you:(

Copy link
Member

@zekth zekth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@zekth
Copy link
Member

zekth commented May 7, 2021

I didn't understand the issue linked, I'm trusting you:(

callback and promise were not handled the same way. Promise was using reply instead of request. See:

optionsResolver(req, (err, options) => {

const ret = optionsResolver(reply)

@climba03003
Copy link
Member Author

I didn't understand the issue linked, I'm trusting you:(

callback and promise were not handled the same way. Promise was using reply instead of request. See:

optionsResolver(req, (err, options) => {

const ret = optionsResolver(reply)

@mcollina zekth explaination is correct for the issue, should we publish as major or patch? Although, it is a fix, we are changing the value passing in the function.

README.md Show resolved Hide resolved
@mcollina mcollina merged commit 28133a8 into fastify:master May 7, 2021
@mcollina
Copy link
Member

mcollina commented May 7, 2021

I'll do a patch - this is a fix.

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.

异步配置cors的 README 示例代码错误,容易误导使用者。
4 participants