style: run prettier on entire codebase

This commit is contained in:
BOHA
2026-03-24 19:59:14 +01:00
parent 872be42107
commit 3c167cf5c4
148 changed files with 26740 additions and 13990 deletions

View File

@@ -1,19 +1,25 @@
import { FastifyReply, FastifyRequest } from 'fastify';
import { config } from '../config/env';
import { FastifyReply, FastifyRequest } from "fastify";
import { config } from "../config/env";
export async function securityHeaders(
_request: FastifyRequest,
reply: FastifyReply,
): Promise<void> {
reply.header('X-Content-Type-Options', 'nosniff');
reply.header('X-Frame-Options', 'DENY');
reply.header('Referrer-Policy', 'strict-origin-when-cross-origin');
reply.header('Permissions-Policy', 'camera=(), microphone=(), geolocation=(self)');
reply.header("X-Content-Type-Options", "nosniff");
reply.header("X-Frame-Options", "DENY");
reply.header("Referrer-Policy", "strict-origin-when-cross-origin");
reply.header(
"Permissions-Policy",
"camera=(), microphone=(), geolocation=(self)",
);
if (config.isProduction) {
reply.header('Strict-Transport-Security', 'max-age=31536000; includeSubDomains');
reply.header(
'Content-Security-Policy',
"Strict-Transport-Security",
"max-age=31536000; includeSubDomains",
);
reply.header(
"Content-Security-Policy",
[
"default-src 'self'",
"script-src 'self' https://unpkg.com",
@@ -21,7 +27,7 @@ export async function securityHeaders(
"font-src 'self' https://fonts.gstatic.com",
"img-src 'self' data: blob: https://*.tile.openstreetmap.org",
"connect-src 'self' https://nominatim.openstreetmap.org",
].join('; '),
].join("; "),
);
}
}