Skip to content

strictDynamic Timeout Issue on Vercel Deployment #101

@raveena-hztl

Description

@raveena-hztl

I’m facing an issue with implementing a Content Security Policy (CSP) using the @next-safe/middleware library with strictDynamic function in Next.js / Sitecore XM Cloud JSS with Next.js application hosted on Vercel.

with this function : strictDynamic({ fallbackScriptSrc: directives['script-src'] }))
Error: Your function was stopped as it did not return an initial response within 25s

"@next-safe/middleware": "^0.10.0",
"next": "^14.1.0",

I’d appreciate any insights or suggestions from the community on:

  • Possible reasons for this timeout error on Vercel.
  • Workarounds or configurations that might resolve the issue.
  • Similar experiences with strictDynamic or other middleware-related functions on Vercel.

Thank you in advance for your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions