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

Add netlifyConfig.headers #2890

Closed
ehmicky opened this issue May 31, 2021 · 2 comments
Closed

Add netlifyConfig.headers #2890

ehmicky opened this issue May 31, 2021 · 2 comments
Assignees
Labels
proj/func-config-api type: feature code contributing to the implementation of a feature and/or user facing functionality

Comments

@ehmicky
Copy link
Contributor

ehmicky commented May 31, 2021

Plugin authors should be able to access the site's headers (set either in netlify.toml or in _redirects) using the netlifyConfig.headers argument.

This is a requirement for #1193, since we cannot make netlifyConfig.headers mutable if that property does not exist.

Additionally, this property should be mutable.

Most of the logic in @netlify/config and @netlify/build (including detecting whether the config file was added by the build command, or whether to remove the _headers file at the end of the build) can be copied from redirects.

@ehmicky ehmicky added type: feature code contributing to the implementation of a feature and/or user facing functionality proj/func-config-api labels May 31, 2021
@ehmicky ehmicky self-assigned this May 31, 2021
@ehmicky
Copy link
Contributor Author

ehmicky commented Aug 10, 2021

PR at #3407.

@ehmicky
Copy link
Contributor Author

ehmicky commented Aug 19, 2021

Done!

@ehmicky ehmicky closed this as completed Aug 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proj/func-config-api type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

No branches or pull requests

1 participant