build icon indicating copy to clipboard operation
build copied to clipboard

@netlify/config: Support _header files

Open RaeesBhatti opened this issue 4 years ago • 2 comments

Which problem is this feature request solving?

Support Netlify's _headers files where @netlify/config package is used.

Describe the solution you'd like

We parse the _headers file and merge the rules with the rules defined in netlify.toml.

Describe alternatives you've considered

  • Keeping _headers files parsing in a different package
  • Providing a separate interface in @netlify/config to parse _headers file manually

Can you submit a pull request?

Yes

RaeesBhatti avatar Jul 20 '20 10:07 RaeesBhatti

Noting that this change would allow plugins to modify site headers. I don't think we'll get to this in Q1; moving to Icebox for now.

verythorough avatar Feb 26 '21 01:02 verythorough

More context:

  1. Netlify CLI currently has code duplicated from our production logic to parse headers.
  2. It would be nice to use a similar approach to ntl dev --edgeHandlers that delegates redirects/headers/any other production logic to a dedicated library

erezrokah avatar Feb 28 '21 09:02 erezrokah

This issue has been automatically marked as stale because it has not had activity in 1 year. It will be closed in 14 days if no further activity occurs. Thanks!

github-actions[bot] avatar Oct 11 '22 14:10 github-actions[bot]

This issue was closed because it had no activity for over 1 year.

github-actions[bot] avatar Oct 25 '22 14:10 github-actions[bot]