Skip to content

Commit

Permalink
allow same origin in sandbox
Browse files Browse the repository at this point in the history
  • Loading branch information
sidwebworks committed Dec 7, 2021
1 parent 7dcea5a commit e12318d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 27 deletions.
2 changes: 1 addition & 1 deletion components/playground/Preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export const Preview: React.FC = () => {
title="preview"
srcDoc={_html}
ref={iFrameRef}
sandbox="allow-scripts"
sandbox="allow-scripts allow-same-origin"
/>
</div>
<ConsoleComponent />
Expand Down
7 changes: 6 additions & 1 deletion pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import type { NextPage } from "next";
import dynamic from "next/dynamic";
import Head from "next/head";

const Playground = dynamic(() => import("../components/playground"), { ssr: false });

const Home: NextPage = () => {
return (
<main className="max-h-screen min-h-screen bg-gray-900">
<main className="max-h-screen min-h-screen bg-gray-900">
<Head>
<title>Web Pen</title>
</Head>
<Playground />
</main>
);
Expand Down
25 changes: 0 additions & 25 deletions pages/playground.tsx

This file was deleted.

1 comment on commit e12318d

@vercel
Copy link

@vercel vercel bot commented on e12318d Dec 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.