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

chore(core): allow dynamic value for header value #13027

Merged

Conversation

dammy001
Copy link
Contributor

@dammy001 dammy001 commented Jan 8, 2024

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?
closes #13012

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@coveralls
Copy link

coveralls commented Jan 8, 2024

Pull Request Test Coverage Report for Build 7c9477ff-a808-444d-84b1-9d6b0d470d13

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 92.1%

Totals Coverage Status
Change from base Build 30e0c3c6-7ddd-4f52-807f-f3506861f267: 0.0%
Covered Lines: 6715
Relevant Lines: 7291

💛 - Coveralls

@micalevisk
Copy link
Member

I guess we should clarify in the docs for this feature when exactly the function will be invoked

@kamilmysliwiec
Copy link
Member

We'd need to update this decorator signature too https://github.com/nestjs/nest/blob/master/packages/common/decorators/http/header.decorator.ts#L17

@dammy001
Copy link
Contributor Author

dammy001 commented Jan 9, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow passing a function to the @Header decorator for dynamic values
6 participants