mirror of
https://github.com/rubenhensen/k8scd.git
synced 2026-09-17 10:22:54 +02:00
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:
@@ -1,7 +1,7 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: lingo-ingress
|
||||
name: lingo-api-ingress
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: prod-cluster-issuer
|
||||
nginx.ingress.kubernetes.io/ssl-passthrough: "false"
|
||||
@@ -19,6 +19,24 @@ spec:
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user