nginx
nginx copied to clipboard
Add BP_WEB_SERVER_LOCATION_INCLUDES to Enable Custom Location Directives
Describe the Enhancement
Add a new optional environment variable, BP_WEB_SERVER_LOCATION_INCLUDES (or similar) to allow users to provide location-scoped NGINX directives while taking advantage of the generated nginx.conf file.
Motivation
Users migrating from buildpacks like Cloud Foundry's Staticfile buildpack commonly only customize server root, push state, and location directives. Currently, users can use this buildpack with a generated nginx.conf using BP_WEB_SERVER_ENABLE_PUSH_STATE and BP_WEB_SERVER_ROOT for the first two features, but must maintain their own nginx.conf if they need any custom location directives. This proposed feature will remove the need for these users to eject from the generated nginx.conf.
@paketo-buildpacks/web-servers-maintainers
I'd be open to a configuration that allows an include inside the default location block. PRs welcome