File tree Expand file tree Collapse file tree 4 files changed +79
-12
lines changed
Expand file tree Collapse file tree 4 files changed +79
-12
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ maintainers:
6677
88type : application
9- version : 1.0.3
9+ version : 1.2.0
1010appVersion : " 1.16.0"
1111
1212dependencies :
Original file line number Diff line number Diff line change 5656 MEMCACHED_HOST : {{ .Values.redis.memcachedHost | quote }}
5757 REDIS_HOST : {{ printf "%s-redis-master" .Release.Name | quote }}
5858 REDIS_PORT : {{ .Values.redis.port | default 6379 | quote }}
59+ {{ else }}
60+ SESSION_DRIVER : {{ .Values.sessionDriver | default "database" | quote }}
61+ SESSION_LIFETIME : " {{ .Values.sessionLifetime | default 120 }}"
5962 {{ end }}
6063
64+ # Session Security Properties
65+ SESSION_SECURE_COOKIE : " {{ .Values.session.secureCookie | default true }}"
66+ SESSION_SAME_SITE : {{ .Values.session.sameSite | default "lax" | quote }}
67+ SESSION_COOKIE : {{ .Values.session.cookieName | default "nmrxiv_session" | quote }}
68+
69+ # Trusted Proxies for CSRF Protection
70+ TRUSTED_PROXIES : {{ .Values.trustedProxies | default "*" | quote }}
71+
72+ # CSRF Configuration
73+ SANCTUM_STATEFUL_DOMAINS : {{ .Values.sanctum.statefulDomains | default .Values.appProperties.url | quote }}
74+
75+ # Force HTTPS for URL generation (important in Kubernetes with ingress)
76+ FORCE_HTTPS : " {{ .Values.forceHttps | default true }}"
77+
6178# RabbitMQ Properties
6279 {{ if .Values.rabbitmq.enabled }}
6380 QUEUE_CONNECTION : {{ .Values.rabbitmq.queueConnection | quote }}
Original file line number Diff line number Diff line change 11{{- if .Values.ingress.enabled -}}
2+ {{- $fullName := include "nmrxiv-app.fullname" . -}}
3+ {{- $svcPort := .Values.service.port -}}
24apiVersion : networking.k8s.io/v1
35kind : Ingress
46metadata :
5- name : {{ include "nmrxiv-app.fullname" . }}-ingress
7+ name : {{ $fullName }}
8+ labels :
9+ {{- include "nmrxiv-app.labels" . | nindent 4 }}
10+ {{- with .Values.ingress.annotations }}
611 annotations :
7- {{- toYaml .Values.ingress.annotations | nindent 4 }}
12+ {{- toYaml . | nindent 4 }}
13+ {{- end }}
814spec :
9- defaultBackend :
10- service :
11- name : {{ include "nmrxiv-app.fullname" . }}
12- port :
13- number : {{ .Values.service.port }}
15+ {{- if .Values.ingress.className }}
16+ ingressClassName : {{ .Values.ingress.className }}
17+ {{- end }}
18+ {{- if .Values.ingress.tls }}
19+ tls :
20+ {{- range .Values.ingress.tls }}
21+ - hosts :
22+ {{- range .hosts }}
23+ - {{ . | quote }}
24+ {{- end }}
25+ secretName : {{ .secretName }}
26+ {{- end }}
27+ {{- end }}
28+ rules :
29+ {{- range .Values.ingress.hosts }}
30+ - host : {{ .host | quote }}
31+ http :
32+ paths :
33+ {{- range .paths }}
34+ - path : {{ .path }}
35+ pathType : {{ .pathType }}
36+ backend :
37+ service :
38+ name : {{ $fullName }}
39+ port :
40+ number : {{ $svcPort }}
41+ {{- end }}
42+ {{- end }}
1443{{- end }}
Original file line number Diff line number Diff line change @@ -101,10 +101,11 @@ service:
101101ingress :
102102 enabled : false
103103 className : " "
104- annotations : {
105- # kubernetes.io/ingress.global-static-ip-name: nmrxiv-app-ip-address
106- # kubernetes.io/ingress.class: "nginx"
107- }
104+ annotations :
105+ # Essential for Laravel CSRF protection behind ingress
106+ nginx.ingress.kubernetes.io/configuration-snippet : |
107+ more_set_headers "X-Forwarded-Proto: https";
108+ more_set_headers "X-Forwarded-Port: 443";
108109 hosts :
109110 - host : chart-example.local
110111 paths :
@@ -242,6 +243,26 @@ redis:
242243 sessionLifetime : 120
243244 memcachedHost : memcached
244245
246+ # Session configuration for Laravel when Redis is disabled
247+ sessionDriver : database
248+ sessionLifetime : 120
249+
250+ # Session security settings (critical for HTTPS deployments)
251+ session :
252+ secureCookie : true
253+ sameSite : lax
254+ cookieName : nmrxiv_session
255+
256+ # Trusted proxies configuration (required for proper CSRF handling behind ingress/load balancer)
257+ trustedProxies : " *"
258+
259+ # Sanctum configuration for API authentication
260+ sanctum :
261+ statefulDomains : " " # Will default to APP_URL if not set
262+
263+ # Force HTTPS URLs (important for Kubernetes deployments with HTTPS ingress)
264+ forceHttps : true
265+
245266rabbitmq :
246267 enabled : false
247268 queueConnection : sync
You can’t perform that action at this time.
0 commit comments