File tree Expand file tree Collapse file tree 3 files changed +29
-2
lines changed
Expand file tree Collapse file tree 3 files changed +29
-2
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ apiVersion: v2
55name : lfx-platform
66description : LFX Platform v2 Helm chart
77type : application
8- version : 0.2.6
8+ version : 0.2.7
99icon : https://github.com/linuxfoundation/lfx-v2-helm/raw/main/img/lfx-logo-color.svg
1010dependencies :
1111 - name : traefik
Original file line number Diff line number Diff line change 11# Copyright The Linux Foundation and each contributor to LFX.
22# SPDX-License-Identifier: MIT
3- ---
43{{ if and .Values.heimdall.enabled (or
54 .Values.gateway.enabled .Values.lfx.parentGateway.enabled) -}}
5+ ---
6+ # Heimdall middleware with body forwarding capability
7+ # This is the default middleware that should be used in most cases, particularly
8+ # when parentRef requiring authentication is in the request body.
9+ # Note: For routes handling very large payloads (like file uploads), consider using
10+ # the lighter-weight middleware below to reduce overhead.
11+ apiVersion : traefik.io/v1alpha1
12+ kind : Middleware
13+ metadata :
14+ name : heimdall-forward-body
15+ namespace : {{ .Release.Namespace }}
16+ spec :
17+ forwardAuth :
18+ address : " http://{{ include " heimdall.fullname" .Subcharts.heimdall }}.{{ .Release.Namespace }}:{{ .Values.heimdall.service.main.port }}"
19+ authResponseHeaders :
20+ - Authorization
21+ forwardBody : true
22+ ---
23+ # Alternative Heimdall middleware without body forwarding
24+ # Use this middleware only for routes where body inspection isn't required for authentication
25+ # and when dealing with large payloads where forwarding the entire body would be inefficient.
626apiVersion : traefik.io/v1alpha1
727kind : Middleware
828metadata :
Original file line number Diff line number Diff line change @@ -192,6 +192,13 @@ heimdall:
192192 type : allow
193193 - id : deny_all
194194 type : deny
195+ - id : json_content_type
196+ type : cel
197+ config :
198+ expressions :
199+ - expression : |
200+ Request.Header("Content-Type") == "application/json"
201+ message: "Content-Type must be application/json"
195202 - id : openfga_check
196203 type : remote
197204 config :
You can’t perform that action at this time.
0 commit comments