Skip to content

Commit

Permalink
Add CORP header to esbuild.ts
Browse files Browse the repository at this point in the history
This allows the dev server to be embedded into other web pages as an
iframe when they have cross-origin-embedder-policy: require-corp.
  • Loading branch information
georgestagg committed Jul 25, 2023
1 parent dba470f commit 98fbc2a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/esbuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ if (serve) {
...proxyRes.headers,
'cross-origin-opener-policy': 'same-origin',
'cross-origin-embedder-policy': 'require-corp',
'cross-origin-resource-policy': 'cross-origin',
});
proxyRes.pipe(res, { end: true });
}
Expand Down

0 comments on commit 98fbc2a

Please sign in to comment.