feat: Redirect http to https
This commit is contained in:
@@ -6,6 +6,12 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
gatewayClassName: cilium
|
gatewayClassName: cilium
|
||||||
listeners:
|
listeners:
|
||||||
|
- name: http
|
||||||
|
protocol: HTTP
|
||||||
|
port: 80
|
||||||
|
allowedRoutes:
|
||||||
|
namespaces:
|
||||||
|
from: Same
|
||||||
- name: https
|
- name: https
|
||||||
protocol: HTTPS
|
protocol: HTTPS
|
||||||
port: 443
|
port: 443
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
apiVersion: gateway.networking.k8s.io/v1
|
||||||
|
kind: HTTPRoute
|
||||||
|
metadata:
|
||||||
|
name: http-filter-redirect
|
||||||
|
namespace: default
|
||||||
|
spec:
|
||||||
|
parentRefs:
|
||||||
|
- name: gateway
|
||||||
|
sectionName: http
|
||||||
|
rules:
|
||||||
|
- filters:
|
||||||
|
- type: RequestRedirect
|
||||||
|
requestRedirect:
|
||||||
|
scheme: https
|
||||||
|
statusCode: 301
|
||||||
@@ -3,3 +3,4 @@ kind: Kustomization
|
|||||||
resources:
|
resources:
|
||||||
- cilium-l2-announcement-policy.yaml
|
- cilium-l2-announcement-policy.yaml
|
||||||
- gateway.yaml
|
- gateway.yaml
|
||||||
|
- http-route-http-filter-redirect.yaml
|
||||||
|
|||||||
Reference in New Issue
Block a user