javascript应用,用于为chrome中的web应用添加http header请求头
使用示例:
发送获取config请求到ws://127.0.0.1:9002
{"messageType":131073}
返回对应的config信息
{
"debug_mode" : true,
"format_version" : "1.1",
"headers" : [
{
"action" : "add",
"apply_on" : "req",
"comment" : "test",
"header_name" : "VTM_terminalno",
"header_value" : "7555980277",
"status" : "on",
"url_contains" : ""
}
],
"target_page" : "",
"use_url_contains" : false
}
通过本地文件的方式读取获取header配置 在mainfest.json中配置对应配置文件路径
"permissions": [
"storage",
"webRequest",
"webRequestBlocking",
"<all_urls>",
"file:///D:/Run/runinfo/runcfg/config.json"
],
3、通过命令行方式附加打开插件(也可以通过商店、chrome内安装等各种形式) C:\Program Files\Google\Chrome\Application\chrome.exe --load-extension=D:\addin\res\VTMModifyHeaders