You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -622,6 +624,21 @@ This can be achieved by using the `nginx.ingress.kubernetes.io/force-ssl-redirec
622
624
623
625
To preserve the trailing slash in the URI with `ssl-redirect`, set `nginx.ingress.kubernetes.io/preserve-trailing-slash: "true"` annotation for that particular resource.
624
626
627
+
### Server-side HTTPS enforcement through forbidden errors
628
+
629
+
In certain scenarios, you might prefer to return a 403 Forbidden error response instead of redirecting traffic to the HTTPS port.
630
+
This approach helps prevent misconfigured clients from inadvertently leaking sensitive data over unencrypted connections.
631
+
632
+
This can be enabled globally using `ssl-forbid-http: "true"` in the [ConfigMap][./configmap.md#ssl-forbid-http].
633
+
634
+
To configure this feature for specific Ingress resources, you can use the `nginx.ingress.kubernetes.io/ssl-forbid-http: "true"`
635
+
annotation in the particular resource.
636
+
637
+
When using SSL off-loading outside of the cluster (e.g. AWS ELB), it may be useful to enforce 403 Forbidden errors to HTTP requests
638
+
even when there is no TLS certificate available.
639
+
640
+
This can be achieved by using the `nginx.ingress.kubernetes.io/force-ssl-forbid-http: "true"` annotation in the particular resource.
641
+
625
642
### Redirect from/to www
626
643
627
644
In some scenarios, it is required to redirect from `www.domain.com` to `domain.com` or vice versa, which way the redirect is performed depends on the configured `host` value in the Ingress object.
0 commit comments