I want to Set a origin in chrome console

Im trying to set a origin with this code in chrome console

var xhr = new XMLHttpRequest();

xhr.open('PUT', url, true);

xhr.setRequestHeader('Origin','https://andromeda');

But chrome is saying “Refused to set unsafe header “Origin””
How can i handle this error

i tried using “Access-Control-Allow-Origin: *”
And i tried some chrome extensions