-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
next.js integration now working correctly on vercel and with various security features enabled in all the modes app/pages, node/edge, page/api, etc additional refactoring and cleanup of related code
- Loading branch information
Theo Ephraim
committed
Jul 17, 2024
1 parent
8e6ce81
commit 9510d05
Showing
35 changed files
with
670 additions
and
265 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"@dmno/nextjs-integration": patch | ||
"@dmno/astro-integration": patch | ||
"dmno": patch | ||
--- | ||
|
||
nextjs integration with working security features, related refactoring to dmno and astro integration |
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
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
24 changes: 24 additions & 0 deletions
24
example-repo/packages/nextjs-web/src/app/intercept-test/page.tsx
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import '@dmno/nextjs-integration/inject'; | ||
|
||
console.log('server top of file', DMNO_CONFIG.SECRET_STATIC); | ||
|
||
export default async function ServerPage() { | ||
console.log('server handler fn --', DMNO_CONFIG.SECRET_STATIC); | ||
console.log('server handler fn --', DMNO_CONFIG.SECRET_DYNAMIC); | ||
|
||
const apiResp = await fetch('https://api.sampleapis.com/beers/ale', { | ||
headers: { | ||
// secret: DMNO_CONFIG.SECRET_STATIC, | ||
'x-another': 'bloop', | ||
}, | ||
}); | ||
|
||
return ( | ||
<main> | ||
<h1>Leaked http interceptor test!</h1> | ||
|
||
<p>This page should fail due to leaking a secret via an outbound http reqeust</p> | ||
|
||
</main> | ||
) | ||
} |
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
18 changes: 18 additions & 0 deletions
18
example-repo/packages/nextjs-web/src/app/leak-test/page.tsx
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import '@dmno/nextjs-integration/inject'; | ||
|
||
console.log('server top of file', DMNO_CONFIG.SECRET_STATIC); | ||
|
||
export default function ServerPage() { | ||
console.log('server handler fn --', DMNO_CONFIG.SECRET_STATIC); | ||
console.log('server handler fn --', DMNO_CONFIG.SECRET_DYNAMIC); | ||
|
||
return ( | ||
<main> | ||
<h1>Leaked content test!</h1> | ||
|
||
<p>This page should fail due to leaking a secret</p> | ||
|
||
<p>{ DMNO_CONFIG.SECRET_STATIC }</p> | ||
</main> | ||
) | ||
} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.