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

Nginx: Move $lagoon_environment_type into its own helper #547

Closed
ocean90 opened this issue Aug 8, 2018 · 1 comment
Closed

Nginx: Move $lagoon_environment_type into its own helper #547

ocean90 opened this issue Aug 8, 2018 · 1 comment

Comments

@ocean90
Copy link

ocean90 commented Aug 8, 2018

Currently x-robots-header-development.conf defines $lagoon_environment_type. This makes the variable also available for other configs.
To make this more clear I suggest to move the variable declaration to its own file like _lagoon_environment_type.conf. I'm using an underscore here to ensure that file is loaded first via the current include rules ( include /etc/nginx/helpers/*.conf;). An alternative would be to use numbered prefixes like 00_lagoon_environment_type.conf, 10_x-robots-header-development.conf, ….

@Schnitzel
Copy link
Contributor

we actually refactored nginx to use openresty which provides LUA, with this we can now use actual LUA scripts which are superior to the nginx ifs.
With that we're also setting the variable here via LUA: #748

I do agree though that the order of the helpers are important, so I have another PR which changes them to be prefixed with numbers: #760

Lagoon Kanban automation moved this from ToDo to Done Nov 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Lagoon Kanban
  
Done
Development

No branches or pull requests

2 participants