Add SSL certificate management to WebUI config

Introduces backend API endpoints and frontend UI for managing SSL certificates, including viewing status, uploading, and deleting cert/key files. Adds a new SSL configuration tab in the dashboard, allowing users to enable HTTPS by providing PEM-formatted certificate and key, with changes taking effect after restart.
This commit is contained in:
手瓜一十雪 committed 2026-01-30 14:28:47 +08:00
1 parent 6b45159fa0
commit 093d7add04
5 files changed
+294 -1

No files matched your search

@@ -5,6 +5,9 @@ import {
UpdateDisableWebUIHandler,
UpdateWebUIConfigHandler,
GetClientIPHandler,
GetSSLStatusHandler,
UploadSSLCertHandler,
DeleteSSLCertHandler,
} from '@/napcat-webui-backend/src/api/WebUIConfig';
const router: Router = Router();
@@ -24,4 +27,13 @@ router.post('/UpdateDisableWebUI', UpdateDisableWebUIHandler);
// 获取当前客户端IP
router.get('/GetClientIP', GetClientIPHandler);
// 获取SSL证书状态
router.get('/GetSSLStatus', GetSSLStatusHandler);
// 上传SSL证书
router.post('/UploadSSLCert', UploadSSLCertHandler);
// 删除SSL证书
router.post('/DeleteSSLCert', DeleteSSLCertHandler);
export { router as WebUIConfigRouter };