diff --git a/argocd/configmap.yaml b/argocd/configmap.yaml index af9792f..758e15f 100644 --- a/argocd/configmap.yaml +++ b/argocd/configmap.yaml @@ -19,4 +19,4 @@ data: LOGOUT_REDIRECT_URL: "login" TRUSTED_PROXIES: "192.168.17.44,192.168.17.53" GUNICORN_OPTS: "--access-logfile -" - IMAGE_TAG: "0.072" + IMAGE_TAG: "0.073" diff --git a/argocd/deployment.yaml b/argocd/deployment.yaml index d981acc..8569fe9 100644 --- a/argocd/deployment.yaml +++ b/argocd/deployment.yaml @@ -27,7 +27,7 @@ spec: mountPath: /data containers: - name: web - image: git.baumann.gr/adebaumann/labhelper:0.072 + image: git.baumann.gr/adebaumann/labhelper:0.073 imagePullPolicy: Always ports: - containerPort: 8000 diff --git a/gunicorn.conf.py b/gunicorn.conf.py index 4db565a..f7b1521 100644 --- a/gunicorn.conf.py +++ b/gunicorn.conf.py @@ -24,6 +24,14 @@ class CustomLogger(Logger): def atoms(self, resp, req, environ, request_time): atoms = super().atoms(resp, req, environ, request_time) atoms["{client-ip}e"] = self._get_client_ip(environ) + headers = { + k[5:].replace("_", "-").lower(): v + for k, v in environ.items() + if k.startswith("HTTP_") + } + atoms["{all-headers}e"] = " | ".join( + f"{k}: {v}" for k, v in sorted(headers.items()) + ) return atoms @staticmethod @@ -42,4 +50,4 @@ class CustomLogger(Logger): logger_class = CustomLogger -access_log_format = '%({client-ip}e)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s" xff:"%({x-forwarded-for}i)s" remote:%(h)s' +access_log_format = '%({client-ip}e)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s" headers:[%({all-headers}e)s]'