nginx icon indicating copy to clipboard operation
nginx copied to clipboard

Add BP_WEB_SERVER_LOCATION_INCLUDES to Enable Custom Location Directives

Open ChuckQuinnIV opened this issue 1 year ago • 3 comments

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.

ChuckQuinnIV avatar Jan 26 '24 18:01 ChuckQuinnIV

@paketo-buildpacks/web-servers-maintainers

sophiewigmore avatar Feb 14 '24 15:02 sophiewigmore

I'd be open to a configuration that allows an include inside the default location block. PRs welcome

arjun024 avatar Feb 15 '24 21:02 arjun024