Files
k8scd/lingo/lingo-ingress.yaml
T
Ruben Hensen 1eb070ad66 Fix ingress rewrite breaking frontend static files
Split lingo-ingress into two separate ingresses:
- lingo-api-ingress: keeps rewrite-target for API path stripping
- lingo-frontend-ingress: no rewrite, allows static files to load

The previous single ingress applied rewrite-target to all paths,
causing frontend requests like /css/bootstrap.css to be rewritten
to / and return index.html instead of the actual files.
2026-02-05 16:54:32 +01:00

51 lines
1.1 KiB
YAML

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: lingo-api-ingress
annotations:
cert-manager.io/cluster-issuer: prod-cluster-issuer
nginx.ingress.kubernetes.io/ssl-passthrough: "false"
nginx.ingress.kubernetes.io/rewrite-target: /$2
spec:
ingressClassName: nginx
rules:
- host: lingo.hensen.io
http:
paths:
- path: /api(/|$)(.*)
pathType: ImplementationSpecific
backend:
service:
name: lingo-api
port:
number: 8000
tls:
- secretName: letsencrypt-prod
hosts:
- lingo.hensen.io
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: lingo-frontend-ingress
annotations:
cert-manager.io/cluster-issuer: prod-cluster-issuer
nginx.ingress.kubernetes.io/ssl-passthrough: "false"
spec:
ingressClassName: nginx
rules:
- host: lingo.hensen.io
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: lingo-frontend
port:
number: 8001
tls:
- secretName: letsencrypt-prod
hosts:
- lingo.hensen.io