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,7 +3,7 @@
<template #header>
<div class="d-flex align-items-center gap-2 flex-wrap">
<h5 class="modal-title fw-bold mb-0" style="color: var(--text-heading);">{{ profile?.username }}</h5>
<span v-if="profile" class="status-badge" :class="status.cls">{{ status.label }}</span>
<StatusBadge v-if="profile" :profile="profile" />
</div>
</template>
<template #body>
@@ -36,6 +36,7 @@
<script setup>
import { ref, computed } from 'vue';
import BaseModal from './BaseModal.vue';
import StatusBadge from './StatusBadge.vue';
const emit = defineEmits(['save']);
const modal = ref(null);
@@ -44,14 +45,6 @@ const note = ref('');
const dirty = computed(() => note.value !== (profile.value?.note || ''));
const status = computed(() => {
const p = profile.value;
if (p?.is_revoked) return { label: 'Revoked', cls: 'status-expired' };
if (p?.is_expired) return { label: 'Expired', cls: 'status-expired' };
if (p?.days_remaining != null && p.days_remaining <= 30) return { label: 'Expiring Soon', cls: 'status-warning' };
return { label: 'Active', cls: 'status-valid' };
});
const daysLabel = computed(() => {
const days = profile.value?.days_remaining;
if (days == null) return '';