-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9b693b7
commit 61d8b96
Showing
13 changed files
with
458 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ | |
}, | ||
"dependencies": { | ||
"@fern-api/fdr-sdk": "workspace:*", | ||
"next": "npm:@fern-api/[email protected].0", | ||
"next": "npm:@fern-api/[email protected].1", | ||
"react": "^18.2.0" | ||
}, | ||
"devDependencies": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,7 +90,7 @@ | |
"mdast-util-to-hast": "^13.1.0", | ||
"mdx-bundler": "^10.0.2", | ||
"moment": "^2.30.1", | ||
"next": "npm:@fern-api/[email protected].0", | ||
"next": "npm:@fern-api/[email protected].1", | ||
"next-mdx-remote": "^5.0.0", | ||
"nprogress": "^0.2.0", | ||
"numeral": "^2.0.6", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,23 @@ | ||
// const deploymentId = process.env.NEXT_DEPLOYMENT_ID; | ||
// export function withSkewProtection(url: string): string { | ||
// if (!deploymentId) { | ||
// return url; | ||
// } | ||
|
||
// if (url.includes("?")) { | ||
// return `${url}&dpl=${deploymentId}`; | ||
// } else { | ||
// return `${url}?dpl=${deploymentId}`; | ||
// } | ||
// } | ||
|
||
const deploymentId = process.env.NEXT_DEPLOYMENT_ID; | ||
export function withSkewProtection(url: string): string { | ||
|
||
// appears to be a browser bug where `Headers` object is not settable, so we will use a plain object instead | ||
export function withSkewProtection(h?: Record<string, string>): HeadersInit | undefined { | ||
if (!deploymentId) { | ||
return url; | ||
return h; | ||
} | ||
|
||
if (url.includes("?")) { | ||
return `${url}&dpl=${deploymentId}`; | ||
} else { | ||
return `${url}?dpl=${deploymentId}`; | ||
} | ||
return new Headers({ ...h, "X-Deployment-Id": deploymentId }); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,7 +52,7 @@ | |
"form-data": "4.0.0", | ||
"jose": "^5.2.3", | ||
"jsonpath": "^1.1.1", | ||
"next": "npm:@fern-api/[email protected].0", | ||
"next": "npm:@fern-api/[email protected].1", | ||
"node-fetch": "2.7.0", | ||
"postcss-import": "^16.0.1", | ||
"react": "^18.2.0", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ | |
}, | ||
"dependencies": { | ||
"@fern-api/fdr-sdk": "workspace:*", | ||
"next": "npm:@fern-api/[email protected].0", | ||
"next": "npm:@fern-api/[email protected].1", | ||
"path-to-regexp": "6.3.0", | ||
"url-join": "5.0.0" | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,7 +45,7 @@ | |
"@types/react": "^18.0.20", | ||
"depcheck": "^1.4.3", | ||
"eslint": "^8.56.0", | ||
"next": "npm:@fern-api/[email protected].0", | ||
"next": "npm:@fern-api/[email protected].1", | ||
"organize-imports-cli": "^0.10.0", | ||
"prettier": "^3.3.2", | ||
"stylelint": "^16.1.0", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,7 @@ | |
"cssnano": "^6.0.3", | ||
"jsonpath": "^1.1.1", | ||
"lodash-es": "^4.17.21", | ||
"next": "npm:@fern-api/[email protected].0", | ||
"next": "npm:@fern-api/[email protected].1", | ||
"node-fetch": "2.7.0", | ||
"postcss-import": "^16.0.1", | ||
"react": "^18.2.0", | ||
|
Oops, something went wrong.