Skip to content

X-Frame-Options Issue When Using Sandpack on Custom Domain #1272

@0xlau

Description

@0xlau

Bug report

Packages affected

  • sandpack-client
  • sandpack-react

Description of the problem

When deploying a web application that uses Sandpack to a custom domain (in this case, deployed on Vercel), the Sandpack iframe fails to load due to X-Frame-Options restrictions.

Failed to load resource: the server responded with a status of 403 ()
Refused to display 'https://2-19-8-sandpack.codesandbox.io/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

Steps to Reproduce

  • Create a web application using Sandpack
  • Deploy the application to Vercel with a custom domain
  • Access the application through the custom domain
  • Observe that Sandpack iframe fails to load with X-Frame-Options error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions