44 lines
1.1 KiB
YAML
44 lines
1.1 KiB
YAML
|
|
apiVersion: gateway.networking.k8s.io/v1
|
||
|
|
kind: HTTPRoute
|
||
|
|
metadata:
|
||
|
|
name: stalwart-user
|
||
|
|
namespace: stalwart
|
||
|
|
spec:
|
||
|
|
parentRefs:
|
||
|
|
- name: gateway-relay
|
||
|
|
namespace: kube-system
|
||
|
|
sectionName: https
|
||
|
|
hostnames:
|
||
|
|
- mail.quorate.dev
|
||
|
|
rules:
|
||
|
|
- matches:
|
||
|
|
- path:
|
||
|
|
type: Exact
|
||
|
|
value: /
|
||
|
|
filters:
|
||
|
|
- type: RequestRedirect
|
||
|
|
requestRedirect:
|
||
|
|
path:
|
||
|
|
type: ReplaceFullPath
|
||
|
|
replaceFullPath: /account/
|
||
|
|
statusCode: 302
|
||
|
|
- matches:
|
||
|
|
- path:
|
||
|
|
type: Exact
|
||
|
|
value: /login
|
||
|
|
filters:
|
||
|
|
- type: RequestRedirect
|
||
|
|
requestRedirect:
|
||
|
|
path:
|
||
|
|
type: ReplaceFullPath
|
||
|
|
replaceFullPath: /account/login
|
||
|
|
statusCode: 302
|
||
|
|
- filters:
|
||
|
|
- type: RequestHeaderModifier
|
||
|
|
requestHeaderModifier:
|
||
|
|
set:
|
||
|
|
- name: X-Forwarded-For
|
||
|
|
value: "%REQ(X-ENVOY-EXTERNAL-ADDRESS)%"
|
||
|
|
backendRefs:
|
||
|
|
- name: stalwart-user
|
||
|
|
port: 8082
|