Skip to content

Instantly share code, notes, and snippets.

@konark-cliqz
Created April 3, 2020 12:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save konark-cliqz/0e72da521dba5943713346b1fbd0afff to your computer and use it in GitHub Desktop.
Save konark-cliqz/0e72da521dba5943713346b1fbd0afff to your computer and use it in GitHub Desktop.
test-IE
// This should not send the referrer back.
function post(url, payload) {
return fetch(url, {
method: 'POST',
mode: 'no-cors',
referrerPolicy: 'no-referrer',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
'Referrer-Policy': 'no-referrer',
},
body: JSON.stringify(payload),
});
}
// This currentlys sends the referrer back
function post(url, payload) {
return fetch(url, {
method: 'POST',
mode: 'no-cors'
headers: {
Accept: 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify(payload),
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment