Refused to set unsafe header "Origin"
See original GitHub issueHi,
iam trieing to modify my header but if i do so i get: vue-resource.min.js:7 Refused to set unsafe header "Origin"
I have a cross domain origin api access. So i need to modify the header.
Any idea how to do this?
The code:
...
getStationInfos: function(stationInfoURL) {
try {
var options = {
xhr: {
withCredentials: true
},
beforeSend: function(request) {
console.log(request);
request.headers.Origin = "http://www.domain.de";
}
};
this.$http.get(stationInfoURL, {}, options).then(function(infos) {
this.$set('currentAudioStream.infos', infos.data);
});
} catch (e) {
console.log(e);
}
},
...
I tried to set the Origin header in the Vue Instnace. Same error…
Thank you
Issue Analytics
- State:
- Created 7 years ago
- Comments:6
Top Results From Across the Web
Refused to set unsafe header "Origin" when using ...
I tried removing the receiveReq.setRequestHeader("Origin", ...) call but then Google Chrome throws an access error on my receiveReq.open() call.
Read more >How to fix Refused to set unsafe header Origin while making ...
Refused to set unsafe header Origin error message when you send requests across domains. For this, we need to set up the Access-Control-Allow- ......
Read more >Refused to get unsafe header - TrackJS
The message describes a failed attempt to access header data from a network request. We discovered this error while working on a prototype...
Read more >set-dangerous-headers-local-expected.txt - Google Git
Test that setRequestHeader cannot be used to alter security-sensitive headers for file:// urls. SUCCESS. Powered by Gitiles| Privacy ...
Read more >"Origin" header incorrectly set for cross-site request via service ...
When a cross-site request is made to a site that uses a service worker to fetch the request - the Origin header is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Chrome Problem
chrome deny