Skip to content

Commit 145f146

Browse files
authored
Set cross-origin on script tags (#447)
1 parent 9b68b9b commit 145f146

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

next-env.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3-
/// <reference types="next/navigation-types/compat/navigation" />
43
/// <reference path="./.next/types/routes.d.ts" />
54

65
// NOTE: This file should not be edited

next.config.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ const withNextra = nextra({
4040

4141
export default withNextra({
4242
basePath: process.env.NEXT_PUBLIC_BASE_DIR ?? undefined,
43+
// This is necessary because we're using CDN domains.
44+
// It adds `cross-origin="anonymous"` to script tags
45+
crossOrigin: "anonymous",
4346
assetPrefix:
4447
process.env.VERCEL_ENV === "production"
4548
? "https://docs-authzed.vercel.app/docs"

0 commit comments

Comments
 (0)