-
Notifications
You must be signed in to change notification settings - Fork 150
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
Replace lua scripting for x-robots header with annotation on ingress objects #2865
Comments
as we want these headers only for autogenerated routes and we know exactly which autogenerated routes are created from the helmcharts (basically all ingress objects, except the one for the |
We do need to inject it on |
I'm just testing this now
I can't see anywhere else that we use server-snippet (it only allows one - https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#server-snippet) |
We don't, but clients can via their .lagoon.yml, and there is no limit on which annotations they can add, so it is feasible that some are adding their own https://docs.lagoon.sh/lagoon/using-lagoon-the-basics/lagoon-yml#ingress-annotations |
@twardnw |
On |
oooh, disregard, I found that we add the headers in two cases:
Edit: what @twardnw said |
so yea, it's possible for the customer to add this to their
which then would overwrite all I could imagine two possibilites:
I'm ok with both. Nr 1 would be easier and not many customers are using the route annotation anyways? |
We could get rid of https://github.com/uselagoon/lagoon-images/blob/main/images/nginx/helpers/100_x-robots-header-development.conf by bringing this logic into the build and adding this annotation to the ingress object
The text was updated successfully, but these errors were encountered: