Fix conditional
This commit is contained in:
parent
92378313f7
commit
6fe0ea6a90
1 changed files with 1 additions and 1 deletions
|
@ -316,7 +316,7 @@ Zotero.Server.DataListener.prototype._processEndpoint = function(method, postDat
|
|||
var headers = "";
|
||||
const originRe = /[\r\n]Origin: +([^ \r\n]+)/i;
|
||||
var m = originRe.exec(this.header);
|
||||
if(m && m[1] === "https://www.zotero.org" || m[1] === "http://www.zotero.org") { Zotero.debug(m[1]);
|
||||
if(m && (m[1] === "https://www.zotero.org" || m[1] === "http://www.zotero.org")) {
|
||||
headers += "Access-Control-Allow-Origin: "+m[1]+"\r\n";
|
||||
headers += "Access-Control-Allow-Methods: POST, GET, OPTIONS\r\n";
|
||||
headers += "Access-Control-Allow-Headers: Content-Type,X-Zotero-Connector-API-Version,X-Zotero-Version\r\n";
|
||||
|
|
Loading…
Add table
Reference in a new issue