mirror of
https://github.com/google/nomulus
synced 2026-01-03 19:54:18 +00:00
Redirect HTTP to HTTPS (#2679)
This opens up port 80 on the load balancer IP and upgrades all HTTP request to HTTPS. TESTED=tested on alpha.
This commit is contained in:
@@ -5,6 +5,12 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
gatewayClassName: gke-l7-global-external-managed-mc
|
gatewayClassName: gke-l7-global-external-managed-mc
|
||||||
listeners:
|
listeners:
|
||||||
|
- name: http
|
||||||
|
protocol: HTTP
|
||||||
|
port: 80
|
||||||
|
allowedRoutes:
|
||||||
|
kinds:
|
||||||
|
- kind: HTTPRoute
|
||||||
- name: https
|
- name: https
|
||||||
protocol: HTTPS
|
protocol: HTTPS
|
||||||
port: 443
|
port: 443
|
||||||
@@ -15,3 +21,19 @@ spec:
|
|||||||
allowedRoutes:
|
allowedRoutes:
|
||||||
kinds:
|
kinds:
|
||||||
- kind: HTTPRoute
|
- kind: HTTPRoute
|
||||||
|
---
|
||||||
|
apiVersion: gateway.networking.k8s.io/v1beta1
|
||||||
|
kind: HTTPRoute
|
||||||
|
metadata:
|
||||||
|
name: redirect
|
||||||
|
spec:
|
||||||
|
parentRefs:
|
||||||
|
- kind: Gateway
|
||||||
|
name: nomulus
|
||||||
|
sectionName: http
|
||||||
|
rules:
|
||||||
|
- filters:
|
||||||
|
- type: RequestRedirect
|
||||||
|
requestRedirect:
|
||||||
|
scheme: https
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ spec:
|
|||||||
parentRefs:
|
parentRefs:
|
||||||
- kind: Gateway
|
- kind: Gateway
|
||||||
name: nomulus
|
name: nomulus
|
||||||
|
sectionName: https
|
||||||
hostnames:
|
hostnames:
|
||||||
- "backend.BASE_DOMAIN"
|
- "backend.BASE_DOMAIN"
|
||||||
rules:
|
rules:
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ spec:
|
|||||||
parentRefs:
|
parentRefs:
|
||||||
- kind: Gateway
|
- kind: Gateway
|
||||||
name: nomulus
|
name: nomulus
|
||||||
|
sectionName: https
|
||||||
hostnames:
|
hostnames:
|
||||||
- "console.BASE_DOMAIN"
|
- "console.BASE_DOMAIN"
|
||||||
rules:
|
rules:
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ spec:
|
|||||||
parentRefs:
|
parentRefs:
|
||||||
- kind: Gateway
|
- kind: Gateway
|
||||||
name: nomulus
|
name: nomulus
|
||||||
|
sectionName: https
|
||||||
hostnames:
|
hostnames:
|
||||||
- "frontend.BASE_DOMAIN"
|
- "frontend.BASE_DOMAIN"
|
||||||
rules:
|
rules:
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ spec:
|
|||||||
parentRefs:
|
parentRefs:
|
||||||
- kind: Gateway
|
- kind: Gateway
|
||||||
name: nomulus
|
name: nomulus
|
||||||
|
sectionName: https
|
||||||
hostnames:
|
hostnames:
|
||||||
- "pubapi.BASE_DOMAIN"
|
- "pubapi.BASE_DOMAIN"
|
||||||
rules:
|
rules:
|
||||||
|
|||||||
Reference in New Issue
Block a user