Skip to content

Commit

Permalink
Merge pull request #745 from NeurodataWithoutBorders/fix-referer
Browse files Browse the repository at this point in the history
Fix Appzi feedback request by spoofing referer
  • Loading branch information
CodyCBakerPhD authored Apr 15, 2024
2 parents eed724b + 32c49ab commit e9e7990
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,11 @@ function initialize() {
// Avoid CORS (for all requests) for Dandiset creation
win.webContents.session.webRequest.onBeforeSendHeaders(
(details, callback) => {
callback({ requestHeaders: { Origin: '*', ...details.requestHeaders } });
callback({ requestHeaders: {
Origin: '*',
Referer: "http://localhost:5174/", // Spoof the referrer
...details.requestHeaders
} });
},
);

Expand Down

0 comments on commit e9e7990

Please sign in to comment.