Created
April 3, 2020 12:33
-
-
Save konark-cliqz/0e72da521dba5943713346b1fbd0afff to your computer and use it in GitHub Desktop.
test-IE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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