fix: swagger UI symlink, CSP headers, email-change route, updateKeyEmail

- Fix swagger-ui symlink in Dockerfile (was pointing to /opt/docfast instead of /app)
- Add CSP directives to allow inline scripts/styles and Google Fonts
- Add email-change.ts route with rate limiting (3/hr) and verification
- Add updateKeyEmail to keys service
- Add email-change route to index.ts with CORS support
This commit is contained in:
OpenClaw 2026-02-14 22:29:56 +00:00
parent 5f10977705
commit 6aa1fa4d84
5 changed files with 127 additions and 3 deletions

View file

@ -118,3 +118,11 @@ export function revokeByCustomer(stripeCustomerId: string): boolean {
export function getAllKeys(): ApiKey[] {
return [...store.keys];
}
export function updateKeyEmail(apiKey: string, newEmail: string): boolean {
const entry = store.keys.find(k => k.key === apiKey);
if (!entry) return false;
entry.email = newEmail;
save();
return true;
}