mirror of https://github.com/knative/docs.git
include documentation about the httpOption annotation (#4273)
* include documentation about the httpOption annotation * drop trailing whitespace * pr feedback
This commit is contained in:
parent
d96c0d8c06
commit
71a8ff5ecb
|
@ -72,6 +72,7 @@ nav:
|
|||
- Configuring custom domains: developer/serving/services/custom-domains.md
|
||||
- Using a custom TLS certificate for DomainMapping: developer/serving/services/byo-certificate.md
|
||||
- Configure resource requests and limits: developer/serving/services/configure-requests-limits-services.md
|
||||
- HTTPS redirection: developer/serving/services/http-option.md
|
||||
- Traffic management: developer/serving/traffic-management.md
|
||||
- Configuring gradual rollout of traffic to Revisions: developer/serving/rolling-out-latest-revision.md
|
||||
- Deploying from private registries: developer/serving/deploying-from-private-registry.md
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
# HTTPS redirection
|
||||
|
||||
Operators can force HTTPS redirection for all Services. See the `httpProtocol` mentioned in the [Turn on AutoTLS](../../../serving/using-auto-tls.md) 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:
|
||||
|
||||
```yaml
|
||||
apiVersion: serving.knative.dev/v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: example
|
||||
namespace: default
|
||||
annotations:
|
||||
networking.knative.dev/httpOption: "enabled"
|
||||
spec:
|
||||
...
|
||||
```
|
||||
|
||||
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
|
Loading…
Reference in New Issue