Update .gitignore and mask 'secret' in settings API

Added /cache, /redis, and /pgdata to .gitignore to prevent committing local data directories. Updated the admin settings API to also mask values for keys containing 'secret' in addition to other sensitive keys.
This commit is contained in:
kikootwo
2025-12-22 09:57:27 -05:00
parent 7c63de8fb1
commit 477a30c2eb
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -48,4 +48,7 @@ next-env.d.ts
/media
/src/generated/prisma
/RMAB
/RMAB
/cache
/redis
/pgdata
+1 -1
View File
@@ -17,7 +17,7 @@ export async function GET(request: NextRequest) {
// Mask sensitive values
const maskValue = (key: string, value: string | null | undefined) => {
const sensitiveKeys = ['token', 'api_key', 'password'];
const sensitiveKeys = ['token', 'api_key', 'password', 'secret'];
if (value && sensitiveKeys.some((k) => key.includes(k))) {
return '••••••••••••';
}