mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-23 02:36:05 +00:00
fix: fixed URL sanitization
This commit is contained in:
parent
e731d1af44
commit
56af1fa748
1 changed files with 1 additions and 5 deletions
|
|
@ -119,11 +119,7 @@ export const createWindow = ({
|
|||
|
||||
// NOTE this is needed for GitHub api requests to work :(
|
||||
// office365 needs a User-Agent as well (#4677)
|
||||
if (
|
||||
!details.url.includes('github.com') &&
|
||||
!details.url.includes('office365.com') &&
|
||||
!details.url.includes('outlook.live.com')
|
||||
) {
|
||||
if (new URL(details.url).hostname in ['github.com', 'office365.com', 'outlook.live.com']) {
|
||||
removeKeyInAnyCase(requestHeaders, 'User-Agent');
|
||||
}
|
||||
callback({ requestHeaders });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue