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

feat: allow headers will be function (#749) #892

Closed
wants to merge 1 commit into from
Closed

feat: allow headers will be function (#749) #892

wants to merge 1 commit into from

Conversation

Nhjkl
Copy link

@Nhjkl Nhjkl commented Apr 29, 2021

@alexander-akait

This PR contains a:

  • bugfix
  • new feature
  • code refactor
  • test update
  • typo fix
  • metadata update

Motivation / Use-Case

new feature + stabilize tests
feat: allow headers will be function #749 #890

Breaking Changes
No

Additional Info
No

@Nhjkl
Copy link
Author

Nhjkl commented May 7, 2021

@alexander-akait

Is there a problem with the operation?
Doesn't seem to respond


if (typeof headers === 'function') {
headers = headers(req, res, context);
if (headers && typeof headers !== 'object') {
Copy link
Member

Choose a reason for hiding this comment

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

let avoid this check, express throw an error on invalid headers

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

2 participants