mirror of
https://github.com/google/nomulus
synced 2025-12-23 06:15:42 +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:
|
||||
gatewayClassName: gke-l7-global-external-managed-mc
|
||||
listeners:
|
||||
- name: http
|
||||
protocol: HTTP
|
||||
port: 80
|
||||
allowedRoutes:
|
||||
kinds:
|
||||
- kind: HTTPRoute
|
||||
- name: https
|
||||
protocol: HTTPS
|
||||
port: 443
|
||||
@@ -15,3 +21,19 @@ spec:
|
||||
allowedRoutes:
|
||||
kinds:
|
||||
- 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:
|
||||
- kind: Gateway
|
||||
name: nomulus
|
||||
sectionName: https
|
||||
hostnames:
|
||||
- "backend.BASE_DOMAIN"
|
||||
rules:
|
||||
|
||||
@@ -6,6 +6,7 @@ spec:
|
||||
parentRefs:
|
||||
- kind: Gateway
|
||||
name: nomulus
|
||||
sectionName: https
|
||||
hostnames:
|
||||
- "console.BASE_DOMAIN"
|
||||
rules:
|
||||
|
||||
@@ -6,6 +6,7 @@ spec:
|
||||
parentRefs:
|
||||
- kind: Gateway
|
||||
name: nomulus
|
||||
sectionName: https
|
||||
hostnames:
|
||||
- "frontend.BASE_DOMAIN"
|
||||
rules:
|
||||
|
||||
@@ -6,6 +6,7 @@ spec:
|
||||
parentRefs:
|
||||
- kind: Gateway
|
||||
name: nomulus
|
||||
sectionName: https
|
||||
hostnames:
|
||||
- "pubapi.BASE_DOMAIN"
|
||||
rules:
|
||||
|
||||
Reference in New Issue
Block a user