NGINX Ingress controller version: 0.25.0
Environment: AWS
The nginx.ingress.kubernetes.io/permanent-redirect-code configuration is not applied to nginx.ingress.kubernetes.io/ssl-redirect.
For example, if I want to override the default code of 308 to 301, the redirect code for SSL redirects stays at 308.
I restarted the nginx-ingress-controller deployment, but it still returns 308.
When I change the configmap nginx-configuration to something like that, it picks up the configuration for SSL redirects as well.
apiVersion: v1
kind: ConfigMap
metadata:
labels:
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
name: nginx-configuration
namespace: ingress-nginx
data:
http-redirect-code: "301"
I would have expected that the configuration of the global redirect code also applies to ssl redirects.
Right now it seems that I have to alter the ConfigMap of the ingress-controller to change this.
This is rather cumbersome as the default config map comes with the controller and it is easier to add the annotations to the ingress resource that needs to be configured anyway.
Why would I change this anyway/is this a use case?:
Some/quite a lot HTTP clients (also Flutter HTTP client: https://api.flutter.dev/flutter/dart-io/HttpClientRequest/followRedirects.html) do not redirect automatically on the 308 Permanent redirect code. Probably because it is newer and some systems did not use it properly before (even Google Drive) (https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/308).
/kind bug
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale
/remove-lifecycle stale
@stefan-kolb
Did you find a solution for it? I have the same problem now.
Only by changing the config map, but not by using the global configuration property.
When I change the configmap nginx-configuration to something like that, it picks up the configuration for SSL redirects as well.
apiVersion: v1
kind: ConfigMap
metadata:
labels:
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
name: nginx-configuration
namespace: ingress-nginx
data:
http-redirect-code: "301"
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale
/remove-lifecycle stale
The same problem with nginx-ingress verion 0.30.0
Most helpful comment
Only by changing the config map, but not by using the global configuration property.