Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
https://gravitee.atlassian.net/browse/APIM-4817
Description
Previously, our default configuration say that even if you enable TLS, we don't redirect HTTP to HTTPS.
By default (without our overwrite config) nginx says:
https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#server-side-https-enforcement-through-redirect
So both case:
will be handled correctly with default nginx configuration.
As we add nginx.ingress.kubernetes.io/ssl-redirect: "false" which is ok by default without TLS.
This mean that even if we enable TLS, the redirection is still disabled.
My proposal is to remove our default setting and keep the nginx default one to make both case (TLS or not) work properly:
enable redirection only if TLS is used.