Skip to content

Commit 7da0196

Browse files
committed
Added removal of Origin from CORS proxy script if not required.
1 parent 20ca13d commit 7da0196

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

html/webapp/functions/programs.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ export async function onRequest(context) {
4040
if (!(targetUrl.startsWith("https://archive.org/") ||
4141
targetUrl.startsWith("https://web.archive.org/"))) {
4242
request.headers.set("Origin", new URL(targetUrl).origin);
43+
} else {
44+
request.headers.delete("Origin");
4345
}
4446

4547
// Perform request to destination URL.

0 commit comments

Comments
 (0)