diff --git a/frontend/src/api/security.ts b/frontend/src/api/security.ts index 71c56635..9378a669 100644 --- a/frontend/src/api/security.ts +++ b/frontend/src/api/security.ts @@ -56,12 +56,12 @@ export const generateBreakGlassToken = async () => { } export const enableCerberus = async (payload?: any) => { - const response = await client.post('/security/enable', payload || {}) + const response = await client.post('/security/enable', payload || {} as unknown) // Specify a more accurate type return response.data } export const disableCerberus = async (payload?: any) => { - const response = await client.post('/security/disable', payload || {}) + const response = await client.post('/security/disable', payload || {} as unknown) // Specify a more accurate type return response.data } diff --git a/frontend/src/hooks/useSecurity.ts b/frontend/src/hooks/useSecurity.ts index 6c1ff5d2..36756c09 100644 --- a/frontend/src/hooks/useSecurity.ts +++ b/frontend/src/hooks/useSecurity.ts @@ -27,7 +27,7 @@ export function useUpdateSecurityConfig() { const qc = useQueryClient() return useMutation({ mutationFn: (payload: any) => updateSecurityConfig(payload), - onSuccess: () => { + onSuccess: () => { // Specify a more accurate type for payload qc.invalidateQueries({ queryKey: ['securityConfig'] }) qc.invalidateQueries({ queryKey: ['securityStatus'] }) toast.success('Security configuration updated') diff --git a/frontend/src/pages/ProxyHosts.tsx b/frontend/src/pages/ProxyHosts.tsx index 3f3fbdaf..fdb3b90d 100644 --- a/frontend/src/pages/ProxyHosts.tsx +++ b/frontend/src/pages/ProxyHosts.tsx @@ -488,11 +488,11 @@ export default function ProxyHosts() { const certInfo = certStatusByDomain[primaryDomain] const isUntrusted = certInfo?.status === 'untrusted' const isStaging = certInfo?.provider?.includes('staging') - const hasCertInfo = !!certInfo return (
-
+ {/* Row 1: Proxy Badges */} +
{host.ssl_forced && ( isUntrusted || isStaging ? ( @@ -510,46 +510,35 @@ export default function ProxyHosts() { WS )} - {host.access_list_id && ( +
+ {/* Row 2: Security Badges */} + {host.access_list_id && ( +
ACL - )} -
+
+ )} + {/* Certificate info below badges */} {host.certificate && host.certificate.provider === 'custom' && (
{host.certificate.name} (Custom)
)} - {host.ssl_forced && !host.certificate && ( - isUntrusted || isStaging ? ( -
- ⚠️ Staging cert - browsers won't trust -
- ) : hasCertInfo ? ( -
- Let's Encrypt ✓ -
- ) : ( -
- Let's Encrypt (Auto) -
- ) + {host.ssl_forced && !host.certificate && (isUntrusted || isStaging) && ( +
+ ⚠️ Staging cert - browsers won't trust +
)}
) })()} -
- updateHost(host.uuid, { enabled: checked })} - /> - - {host.enabled ? 'Enabled' : 'Disabled'} - -
+ updateHost(host.uuid, { enabled: checked })} + />