@@ -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