Not logged in : Login

About: nodeID://b1065563       Sponge   NotDistinct   Permalink

An Entity of Type : owl:Thing, within Data Space : ods-qa.openlinksw.com:8896 associated with source document(s)

AttributesValues
type
publisher
author
described by
dateModified
  • 2020-04-11T00:57:10Z
mainEntityOfPage
articleBody
  • Hi, Recently I am making a very simple ajax post request in content-script, for example Blockquote var xhr = new XMLHttpRequest(); xhr.open(‘POST’, tokenUrl, true); xhr.setRequestHeader(‘Content-Type’, ‘application/x-www-form-urlencoded’); xhr.onreadystatechange = function() { if (this.readyState === XMLHttpRequest.DONE && this.status === 200) { console.log(‘Success’); } } xhr.send(‘a=1&b=2’); please note that the tokenUrl is actually on the same domain as the current tab’s domain, so actually I am not doing any CORS. However if I inspect the network, the Origin header is not set, I also tried on Chrome extension, the Origin header is set correctly. Besides, if I directly use the same ajax on Firefox tab’s console, the Origin header is set correctly So it seems Firefox content-script misses the Origin header, Is there any idea to add it? Thank you very much
headline
  • How to add Origin header in content-script ajax call
keywords
position
  • #1
datePublished
interactionStatistic
is topic of
is md:item of
Faceted Search & Find service v1.17_git55 as of Mar 01 2021


Alternative Linked Data Documents: ODE     Content Formats:       RDF       ODATA       Microdata      About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 08.03.3322 as of Mar 14 2022, on Linux (x86_64-generic-linux-glibc25), Single-Server Edition (7 GB total memory)
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2024 OpenLink Software