UI review, stage 2: nginx security headers, gzip, cache; npm ci; no v-html

default.conf.template: X-Content-Type-Options, X-Frame-Options,
Referrer-Policy, CSP, gzip, immutable cache for /assets/, no-cache for
index.html and config.json, server_tokens off, drop proxy_pass_header.
Dockerfile uses npm ci, .dockerignore added (nginx stays root: the image
entrypoint and port 80 need it). Status badge is a component instead of
v-html.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
ayurishchevandClaude Sonnet 5.5 committed 2026-10-07 13:07:16 +03:00
1 parent b78de98f26
commit 600119cdd1
6 files changed
+76 -32

No files matched your search

+3 -2
View File
@@ -2,14 +2,15 @@
FROM node:20-alpine AS build-stage
WORKDIR /app
COPY package*.json ./
RUN npm install
RUN npm ci
COPY . .
RUN npm run build
# Stage 2: Serve
# nginx runs as root here: the image entrypoint renders the template into /etc/nginx/conf.d and port 80
# is published by docker-compose. An unprivileged variant would change the port and the image.
FROM nginx:alpine
COPY --from=build-stage /app/dist /usr/share/nginx/html
COPY default.conf.template /etc/nginx/templates/default.conf.template
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]