Add X-Forwarded-Proto header to APRS IngressRoute
- Ensures Phoenix knows the original request was HTTPS
- Complements externalTrafficPolicy:Local on Traefik service
- Service was patched with: kubectl patch service traefik -n traefik -p '{"spec":{"externalTrafficPolicy":"Local"}}'
- This preserves real client IPs for geolocation
This commit is contained in:
parent
821c676d48
commit
ab1afaebf0
1 changed files with 12 additions and 0 deletions
|
|
@ -14,6 +14,16 @@ spec:
|
|||
- www.aprs.me
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: real-ip
|
||||
namespace: aprs
|
||||
spec:
|
||||
headers:
|
||||
customRequestHeaders:
|
||||
X-Forwarded-Proto: "https"
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: aprs-https
|
||||
|
|
@ -24,6 +34,8 @@ spec:
|
|||
routes:
|
||||
- match: Host(`aprs.me`) || Host(`www.aprs.me`)
|
||||
kind: Rule
|
||||
middlewares:
|
||||
- name: real-ip
|
||||
services:
|
||||
- name: aprs
|
||||
port: 80
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue