Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions edgecompute/examples/security/csp/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ export async function responseProvider(request) {
let headerNonce = 'nonce-' + encodedData;

//Step 2: Replace the origin nonce with our generated nonce in the CSP response header
const headers = request.getHeaders();
let options = {};
let htmlResponse = await httpRequest("/", options);
let htmlResponse = await httpRequest("/");
if (!htmlResponse.ok) {
return createResponse(500, {}, `Failed to fetch doc: ${htmlResponse.status}`);
}
Expand Down Expand Up @@ -47,4 +45,4 @@ function getSafeResponseHeaders(headers) {
}
}
return headers;
}
}