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
@@ -628,6 +630,21 @@ This can be achieved by using the `nginx.ingress.kubernetes.io/force-ssl-redirec
628
630
629
631
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.
630
632
633
+
### Server-side HTTPS enforcement through forbidden errors
634
+
635
+
In certain scenarios, you might prefer to return a 403 Forbidden error response instead of redirecting traffic to the HTTPS port.
636
+
This approach helps prevent misconfigured clients from inadvertently leaking sensitive data over unencrypted connections.
637
+
638
+
This can be enabled globally using `ssl-forbid-http: "true"` in the [ConfigMap][./configmap.md#ssl-forbid-http].
639
+
640
+
To configure this feature for specific Ingress resources, you can use the `nginx.ingress.kubernetes.io/ssl-forbid-http: "true"`
641
+
annotation in the particular resource.
642
+
643
+
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
644
+
even when there is no TLS certificate available.
645
+
646
+
This can be achieved by using the `nginx.ingress.kubernetes.io/force-ssl-forbid-http: "true"` annotation in the particular resource.
647
+
631
648
### Redirect from/to www
632
649
633
650
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