Hi. I need to add some headers to my nginx server (specifically the Allowed* headers). I checked the Lando nginx services docs, and it appears there is no support for a pattern like:
And instead the docs indicate: “You may need to override our default nginx config with your own custom server, vhosts or fastcgi_params config.” And there are only options for server, vhosts, params, with no options for additional configs.
This of course means I would have to duplicate the entire nginx server config.
Is there really no way to override parts of the config? With mysql, for example, I can include a config file to add certain parameters I need rather than override the default config. Is there a better pattern than copy+pasting the shipping nginx server config, modifying it, and then mounting it to the service container?
Considering how common it is to need to modify Allowed headers (especially for development), I must be missing something obvious.
The Request
Be able to add nginx server config without having to override the whole file. Two patterns I have seen elsewhere (Platform SH) for example, and Lando:
Where the custom.conf is not the entire server conf file, but just modifications to it, like when apache allows you do include a directory of additional configs etc.
Background
I posted the following question in Lando slack:
Hi. I need to add some headers to my nginx server (specifically the Allowed* headers). I checked the Lando nginx services docs, and it appears there is no support for a pattern like:
And instead the docs indicate: “You may need to override our default nginx config with your own custom server, vhosts or fastcgi_params config.” And there are only options for server, vhosts, params, with no options for additional configs.
This of course means I would have to duplicate the entire nginx server config.
Is there really no way to override parts of the config? With mysql, for example, I can include a config file to add certain parameters I need rather than override the default config. Is there a better pattern than copy+pasting the shipping nginx server config, modifying it, and then mounting it to the service container?
Considering how common it is to need to modify Allowed headers (especially for development), I must be missing something obvious.
The Request
Be able to add nginx server config without having to override the whole file. Two patterns I have seen elsewhere (Platform SH) for example, and Lando:
Overrides Pattern:
Include Pattern (like Lando mysql service):
Where the custom.conf is not the entire server conf file, but just modifications to it, like when apache allows you do include a directory of additional configs etc.