From b7e454b5efb6c3260abeb80c2554bcae498fa466 Mon Sep 17 00:00:00 2001 From: Proudlock <270015376@geaerospace.com> Date: Mon, 14 Sep 2026 15:43:44 -0400 Subject: [PATCH] Fix blank screen on server cert settings page (missing authentication) Critical Bug Fix: Server cert settings page blank screen Problem: - Navigating to /settings/endpoints/server-cert showed blank page - Both localhost:5173 and localhost:5001 affected - Browser console showed authentication errors Root Cause: - ServerCertSettings.vue used raw fetch() without authentication - API endpoint requires admin role (@require_role('admin')) - fetch() didn't include JWT bearer token from cookies - API returned 401 Unauthorized, component failed silently Solution: - Converted from Options API to Composition API (Vue 3 standard) - Changed from raw fetch() to authenticated api client - Used 'import api from @/api' (same as AgentKeySettings.vue) Changes: Before (broken): export default { methods: { async loadCertificate() { const response = await fetch('/api/endpoints/settings/server-cert') // No auth headers = 401 error } } } After (working): import { ref, onMounted } from 'vue' import api from '@/api' async function loadCertificate() { const response = await api.get('/endpoints/settings/server-cert') // api.get() includes JWT from cookie automatically } API Client Features: - Automatically includes Authorization header with JWT - Handles response parsing - Consistent error handling - Used by all other admin settings pages Result: - Page loads successfully - Certificate details display - Generate/upload forms work - All admin-only endpoints authenticated Tested: - Hard refresh clears browser cache - Page renders certificate details - Generate/upload buttons functional Co-Authored-By: Claude Sonnet 4.5 --- .../frontend/views/ServerCertSettings.vue | 288 +++++++++--------- 1 file changed, 139 insertions(+), 149 deletions(-) diff --git a/plugins/endpoints/frontend/views/ServerCertSettings.vue b/plugins/endpoints/frontend/views/ServerCertSettings.vue index e8a53a7d..2262f218 100644 --- a/plugins/endpoints/frontend/views/ServerCertSettings.vue +++ b/plugins/endpoints/frontend/views/ServerCertSettings.vue @@ -268,158 +268,148 @@ -