only delete origin header for sdk calls - leave everything else as is
This commit is contained in:
parent
339ebf2d32
commit
a8c3ec54ae
2 changed files with 10 additions and 2 deletions
|
@ -158,7 +158,9 @@ if (!gotSingleInstanceLock) {
|
|||
// By default, electron sends http://localhost:{port} as the origin for POST requests
|
||||
// https://github.com/electron/electron/issues/7931#issuecomment-361759277
|
||||
session.defaultSession.webRequest.onBeforeSendHeaders((details, callback) => {
|
||||
delete details.requestHeaders['Origin'];
|
||||
if (details.method === 'POST' && details.requestHeaders['Content-Type'] === 'application/json-rpc') {
|
||||
delete details.requestHeaders['Origin'];
|
||||
}
|
||||
callback({ cancel: false, requestHeaders: details.requestHeaders });
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1204,5 +1204,11 @@
|
|||
"No information will be sent directly to LBRY, Inc. or third-parties about your usage. Note that as\n peer-to-peer software, your IP address and potentially other system information can be sent to other\n users, though this information is not stored permanently.": "No information will be sent directly to LBRY, Inc. or third-parties about your usage. Note that as\n peer-to-peer software, your IP address and potentially other system information can be sent to other\n users, though this information is not stored permanently.",
|
||||
"%view_count% Views": "%view_count% Views",
|
||||
"This channel hasn't published anything yet": "This channel hasn't published anything yet",
|
||||
"Buy": "Buy"
|
||||
"Buy": "Buy",
|
||||
"Buy LBRY Credits": "Buy LBRY Credits",
|
||||
"Country": "Country",
|
||||
"Only some countries are eligible at this time. We are working to make this available to everyone.": "Only some countries are eligible at this time. We are working to make this available to everyone.",
|
||||
"Select your country": "Select your country",
|
||||
"LBRY, Inc. partners with Moonpay to provide the option to purchase LBC. %learn_more%.": "LBRY, Inc. partners with Moonpay to provide the option to purchase LBC. %learn_more%.",
|
||||
"Your browser does not support iframes.": "Your browser does not support iframes."
|
||||
}
|
Loading…
Reference in a new issue