Skip to content

Commit 2bddf0a

Browse files
author
mdatelle
committed
chore: set frameguard to false and remove any's
1 parent 665d4b6 commit 2bddf0a

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

api/src/unraid-api/main.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,10 @@ export async function bootstrapNestServer(): Promise<NestFastifyApplication> {
2222

2323
const server = app.getHttpAdapter().getInstance();
2424

25-
// Type casting is needed due to version mismatches between @nestjs/platform-fastify and fastify
26-
await (server as any).register(fastifyCookie);
25+
await server.register(fastifyCookie);
2726

2827
// Minimal Helmet configuration to avoid blocking plugin functionality
29-
await (server as any).register(fastifyHelmet, {
28+
await server.register(fastifyHelmet, {
3029
// Disable restrictive policies
3130
contentSecurityPolicy: false,
3231
crossOriginEmbedderPolicy: false,
@@ -42,9 +41,7 @@ export async function bootstrapNestServer(): Promise<NestFastifyApplication> {
4241
ieNoOpen: true, // Prevents IE from executing downloads in site context
4342
permittedCrossDomainPolicies: true, // Restricts Adobe Flash and PDF access
4443
referrerPolicy: { policy: 'no-referrer-when-downgrade' }, // Safe referrer policy
45-
46-
// X-Frame-Options to prevent clickjacking
47-
frameguard: { action: 'sameorigin' }, // Allows framing only from same origin
44+
frameguard: false, // Turn off for plugin compatibility
4845

4946
// HSTS disabled to avoid issues with running on local networks
5047
hsts: false,

0 commit comments

Comments
 (0)