Don't use Firefox UA for proxy-check S3 domain

https://forums.zotero.org/discussion/comment/396502/#Comment_396502
This commit is contained in:
Dan Stillman 2022-01-03 01:22:14 -05:00
parent b1b9759864
commit 52d5652540

View file

@ -1962,9 +1962,9 @@ Zotero.VersionHeader = {
channel.setRequestHeader("X-Zotero-Version", Zotero.version, false);
}
else {
// Use "Firefox/[version]" in user agent if not a file sync request
let s3DomainRE = /zoterofilestorage(test)?\.s3\.(us-east-1\.)?amazonaws\.com/;
let isAppNameDomain = s3DomainRE.test(domain);
// Use "Firefox/[version]" in user agent if not a proxy check or file sync request
let s3RE = /(zoteroproxycheck|zoterofilestorage(test))?\.s3\.(us-east-1\.)?amazonaws\.com/;
let isAppNameDomain = s3RE.test(domain);
if (!isAppNameDomain) {
let ua = channel.getRequestHeader('User-Agent');
ua = this.update(ua);