fix: Send User-Agent to office365.com as it appearently needs it since a

few weeks #4677
This commit is contained in:
Johann Janosch 2025-07-30 12:59:08 +02:00
parent b800619a3c
commit 0fbb25fd10

View file

@ -118,7 +118,8 @@ export const createWindow = ({
removeKeyInAnyCase(requestHeaders, 'accept');
// NOTE this is needed for GitHub api requests to work :(
if (!details.url.includes('github.com')) {
// office365 needs a User-Agent as well (#4677)
if (!details.url.includes('github.com') && !details.url.includes('office365.com')) {
removeKeyInAnyCase(requestHeaders, 'User-Agent');
}
callback({ requestHeaders });