圈x修改数据(圈x抓包进价篇:修改响应头 response header)-Quantumult X论坛-脚本模块-山海云端论坛

圈x修改数据(圈x抓包进价篇:修改响应头 response header)

同修改请求头

/**
 * @fileoverview Example of HTTP rewrite of response header.
 *
 * @supported Quantumult X (v1.0.5-build183)
 *
 * [rewrite_local]
 * ^http://example\.com/resource8/ url script-response-header response-header.js
 */

// $request.scheme, $request.method, $request.url, $request.path, $request.headers
// $response.statusCode, $response.headers

var modifiedHeaders = $response.headers;

modifiedHeaders['Key'] = 'whatever';

var modifiedStatus = 'HTTP/1.1 200 OK';

$done({status: modifiedStatus, headers : modifiedHeaders});

// $done({headers : modifiedHeaders});
// $done({}); // Not changed.
请登录后发表评论

    没有回复内容