feat: Redirect http to https

This commit is contained in:
2025-12-17 03:51:06 +01:00
parent 2cc36bacce
commit 4990b6e9c0
3 changed files with 22 additions and 0 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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