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.
This commit is contained in:
Ruben Hensen
2026-02-05 16:54:32 +01:00
parent ebac0c1713
commit 1eb070ad66
+19 -1
View File
@@ -1,7 +1,7 @@
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1
kind: Ingress kind: Ingress
metadata: metadata:
name: lingo-ingress name: lingo-api-ingress
annotations: annotations:
cert-manager.io/cluster-issuer: prod-cluster-issuer cert-manager.io/cluster-issuer: prod-cluster-issuer
nginx.ingress.kubernetes.io/ssl-passthrough: "false" nginx.ingress.kubernetes.io/ssl-passthrough: "false"
@@ -19,6 +19,24 @@ spec:
name: lingo-api name: lingo-api
port: port:
number: 8000 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: / - path: /
pathType: Prefix pathType: Prefix
backend: backend: