HTTPS redirection

Operators can force HTTPS redirection for all Services. See the httpProtocol mentioned in the Turn on AutoTLS page for more details.

Overriding the default HTTP behaviour

You can override the default behavior for each Service by configuring the networking.knative.dev/httpOption annotation:

  1. apiVersion: serving.knative.dev/v1
  2. kind: Service
  3. metadata:
  4. name: example
  5. namespace: default
  6. annotations:
  7. networking.knative.dev/httpOption: "enabled"
  8. spec:
  9. ...

The possible values are:

  • enabled - Services will accept HTTP traffic
  • redirected - Services send a 301 redirect for all HTTP connections and ask clients to use HTTPS instead