EUS/utilities/HeaderUtility.ts
2025-01-25 12:21:55 +00:00

15 lines
No EOL
748 B
TypeScript

import type { FastifyReply } from "fastify";
export default abstract class HeaderUtility {
public static AddHeaders(res: FastifyReply) {
res.header("x-powered-by", "EUS");
res.header("rel", "cute");
res.header("Strict-Transport-Security", "max-age=31536000; includeSubDomains");
res.header("X-XSS-Protection", "1; mode=block");
res.header("Permissions-Policy", "microphone=(), geolocation=(), magnetometer=(), camera=(), payment=(), usb=(), accelerometer=(), gyroscope=()");
res.header("Referrer-Policy", "strict-origin-when-cross-origin");
res.header("Content-Security-Policy", "block-all-mixed-content;frame-ancestors 'self'");
res.header("X-Frame-Options", "SAMEORIGIN");
res.header("X-Content-Type-Options", "nosniff");
}
}