Skip to content

Commit

Permalink
Merge pull request #1037 from OWASP/prepare-release
Browse files Browse the repository at this point in the history
rename to 404 not to conflict with error route.
  • Loading branch information
sydseter authored Feb 11, 2025
2 parents 86da73a + dcd2cf9 commit 684f941
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cornucopia.owasp.org/script/headers.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function main() {
/how-to-play
! Permissions-Policy
Permissions-Policy: accelerometer=(), autoplay=(), camera=(), document-domain=(), encrypted-media=(), fullscreen=(self "https://www.youtube.com/"), gyroscope=(), interest-cohort=(), magnetometer=(), microphone=(), midi=(), payment=(), picture-in-picture=(self "https://www.youtube.com/"), publickey-credentials-get=(), sync-xhr=(), usb=(), xr-spatial-tracking=(), geolocation=()
/error
/404
X-Robots-Tag: noindex
`;

Expand Down
6 changes: 3 additions & 3 deletions cornucopia.owasp.org/script/nonce-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ async function fetchAndStreamNotFoundPage(resp) {
const pathArray = resp.url.split( '/' );
const protocol = pathArray[0];
const host = pathArray[2];
const url = protocol + '//' + host + '/error';
const url = protocol + '//' + host + '/404';
const { headers } = resp;

const response = await fetch(url);
Expand Down Expand Up @@ -57,10 +57,10 @@ async function handleRequest(request) {
return fetchAndStreamNotFoundPage(originresponse);
}

return generateNonce(originresponse);
return generateNonceForResponse(originresponse);
}

async function generateNonce(originresponse) {
async function generateNonceForResponse(originresponse) {
const nonce = generateNonce();

const html = (await originresponse.text())
Expand Down

0 comments on commit 684f941

Please sign in to comment.