feat(security): add a report-only CSP and security headers
Build, Test & Push Frontend / quality-check (push) Successful in 14s
Build, Test & Push Frontend / docker (push) Successful in 23s

nginx.conf is now an nginx template, so connect-src takes
AUTH_HOST and API_HOST from the container env. The image
sets both to empty by default, so nginx still starts
without them. Report-only until production shows no
violation. Also nosniff, Referrer-Policy and
Permissions-Policy.
This commit is contained in:
lobo committed 2026-09-25 15:47:23 +02:00
1 parent f8e6c2c970
commit 6edb53162e
4 files changed
+56 -3

No files matched your search

+3 -1
View File
@@ -9,6 +9,8 @@ RUN npm run build
# Serve the static files using a lightweight web server
FROM nginx:alpine
COPY --from=builder /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
# nginx.conf is a template. An env var that is not set stays in it as ${...}, and nginx then fails to start.
ENV AUTH_HOST="" API_HOST=""
COPY nginx.conf /etc/nginx/templates/default.conf.template
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]