无法在Chrome扩展程序中设置带下划线的Cookie名称

时间:2019-03-12 13:45:53

标签: google-chrome google-chrome-extension

我无法设置带有我的chrome扩展名的cookie名称中带有下划线的cookie。 enter image description here 这是我设置Cookie的相关代码

if (Number(request.expirationDate) == 0) {
                    chrome.cookies.set({url:request.url ,name: request.name ,value: request.value , domain: request.domain , path: request.path , secure: asBoolean(request.secure) , httpOnly: request.httpOnly}); 
                    } else {
                    chrome.cookies.set({url:request.url ,name: request.name ,value: request.value , domain: request.domain , path: request.path , secure: asBoolean(request.secure) , httpOnly: request.httpOnly  , expirationDate: Number(request.expirationDate)});
                    }

修改 经过仔细检查,我发现该Cookie的值是空的。这就是我发送给chrome扩展程序的信息。

chrome.runtime.sendMessage(editorExtensionId, {"url":"https:\/\/my.test.com","name":"wordpress_user_sw_1ef0e9e7d0d89edf025ec2f501da879c","value":" ","domain":"my.test.com","path":"\/","secure":"FALSE","httpOnly":false,"expirationDate":"1552372713"});

0 个答案:

没有答案