Compare commits

...

3 Commits

Author SHA1 Message Date
Anthony LC 5c14c774f1 fixup! 🚨(backend) fix warning SSL 222 2024-06-21 11:55:14 +02:00
Anthony LC 258fd7663c test-helm2 2024-06-21 10:07:56 +02:00
Anthony LC 5ee9f13c4a 🚨(backend) fix warning SSL
The logs were showing a warning about the SSL.
-  You have not set a value for the
SECURE_HSTS_SECONDS setting.
- Your SECURE_SSL_REDIRECT setting is not set
to True.

This commit fixes the warning by setting the
SECURE_HSTS_SECONDS to 31536000 and
SECURE_SSL_REDIRECT to True.
2024-06-21 10:07:45 +02:00
6 changed files with 31 additions and 3 deletions
+1
View File
@@ -5,6 +5,7 @@ on:
push:
branches:
- 'main'
- 'fix/warning-backend'
tags:
- 'v*'
pull_request:
+6
View File
@@ -515,6 +515,12 @@ class Production(Base):
CSRF_TRUSTED_ORIGINS = values.ListValue([])
SECURE_BROWSER_XSS_FILTER = True
SECURE_CONTENT_TYPE_NOSNIFF = True
SECURE_HSTS_SECONDS = values.IntegerValue(
default=31536000, environ_name="SECURE_HSTS_SECONDS"
)
SECURE_SSL_REDIRECT = values.BooleanValue(
default=True, environ_name="SECURE_SSL_REDIRECT"
)
# SECURE_PROXY_SSL_HEADER allows to fix the scheme in Django's HttpRequest
# object when your application is behind a reverse proxy.
@@ -57,7 +57,7 @@ export const Header = () => {
<Box $align="center" $gap="1rem" $direction="row">
<Image priority src={IconApplication} alt={t('Equipes Logo')} />
<Text $margin="none" as="h2" $theme="primary">
{t('Equipes')}
{t('Equipes Test')}
</Text>
</Box>
</Box>
+1
View File
@@ -125,6 +125,7 @@ tcpSocket:
httpGet:
path: {{ .path }}
port: {{ .targetPort }}
scheme: {{ .scheme | default "HTTP" }}
{{- end }}
initialDelaySeconds: {{ .initialDelaySeconds | eq nil | ternary 0 .initialDelaySeconds }}
timeoutSeconds: {{ .timeoutSeconds | eq nil | ternary 1 .timeoutSeconds }}
+10
View File
@@ -0,0 +1,10 @@
apiVersion: v1
kind: Secret
metadata:
name: backend
namespace: {{ .Release.Namespace | quote }}
stringData:
DJANGO_SUPERUSER_PASSWORD: {{ .Values.djangoSuperUserPass }}
DJANGO_SECRET_KEY: {{ .Values.djangoSecretKey }}
OIDC_RP_CLIENT_ID: {{ .Values.oidc.clientId }}
OIDC_RP_CLIENT_SECRET: {{ .Values.oidc.clientSecret }}
+12 -2
View File
@@ -1,7 +1,7 @@
image:
repository: lasuite/people-backend
pullPolicy: Always
tag: "main"
tag: "fix-warning-backend"
backend:
migrateJobAnnotations:
@@ -92,11 +92,21 @@ backend:
- python manage.py createsuperuser --admin_email $DJANGO_SUPERUSER_EMAIL --password $DJANGO_SUPERUSER_PASSWORD
restartPolicy: Never
probes:
liveness:
path: /__heartbeat__
scheme: HTTPS
initialDelaySeconds: 10
readiness:
path: /__lbheartbeat__
scheme: HTTPS
initialDelaySeconds: 10
frontend:
image:
repository: lasuite/people-frontend
pullPolicy: Always
tag: "main"
tag: "fix-warning-backend"
ingress:
enabled: true