Fix diagnostic sweep bugs — tags, random, 404s, security headers

- Tags: data.TagCollection→data.MediaTagCollection (was returning empty array)
- Random: Math.random()*50→crypto.randomInt(1,500) for true randomness
- Character/Staff: return 404 instead of 500 on not-found
- Security: added X-XSS-Protection header
- All 44 endpoints tested in full diagnostic sweep
This commit is contained in:
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ
2026-06-25 09:56:58 +05:30
parent 00275adb42
commit 5acf8a2e1e
3 changed files with 9 additions and 5 deletions
+1
View File
@@ -113,6 +113,7 @@ app.use((req, res, next) => {
app.use((req, res, next) => {
res.setHeader("X-Frame-Options", "DENY");
res.setHeader("X-Content-Type-Options", "nosniff");
res.setHeader("X-XSS-Protection", "1; mode=block");
res.setHeader("Strict-Transport-Security", "max-age=31536000; includeSubDomains");
res.setHeader("Referrer-Policy", "strict-origin-when-cross-origin");
res.setHeader("Permissions-Policy", "camera=(), microphone=(), geolocation=()");