mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 09:15:35 +00:00
Bug 1541860 - Omit cookies sent when preloading intermediates r=johannh
Intermediate preloading was including cookies during attachment fetches to our Kinto attachment servers. There's no reason for that, so let's not. Differential Revision: https://phabricator.services.mozilla.com/D26193 --HG-- extra : rebase_source : b3fbb6c80c56b8428434fb177cad3424a66b837d extra : source : 87be514024ac53ab6362ffc26610c063d50abe07
This commit is contained in:
parent
0b9886fc20
commit
9cae98a2ed
@ -30,7 +30,9 @@ XPCOMUtils.defineLazyGetter(this, "gTextDecoder", () => new TextDecoder());
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "baseAttachmentsURL", async () => {
|
||||
const server = Services.prefs.getCharPref("services.settings.server");
|
||||
const serverInfo = await (await fetch(`${server}/`)).json();
|
||||
const serverInfo = await (await fetch(`${server}/`, {
|
||||
credentials: "omit",
|
||||
})).json();
|
||||
const {capabilities: {attachments: {base_url}}} = serverInfo;
|
||||
return base_url;
|
||||
});
|
||||
@ -181,8 +183,10 @@ this.RemoteSecuritySettings = class RemoteSecuritySettings {
|
||||
const headers = new Headers();
|
||||
headers.set("Accept-Encoding", "gzip");
|
||||
|
||||
return fetch(remoteFilePath, {headers})
|
||||
.then(resp => {
|
||||
return fetch(remoteFilePath, {
|
||||
headers,
|
||||
credentials: "omit",
|
||||
}).then(resp => {
|
||||
log.debug(`Download fetch completed: ${resp.ok} ${resp.status}`);
|
||||
if (!resp.ok) {
|
||||
Cu.reportError(`Failed to fetch ${remoteFilePath}: ${resp.status}`);
|
||||
|
Loading…
Reference in New Issue
Block a user