google-chrome - 使用 declarativeNetRequest 进行动态重定向
问题描述
我想使用 declarativeNetRequest 将域中的所有 URL 重定向到以发起方 URL 作为编码参数的 URL,例如
http://www.google.com --> http://www.newsite.com?url=http%3A%2F%2Fwww.google.com
http://www.google.com?param1=true --> http://www.newsite.com?url=http%3A%2F%2Fwww.google.com%3Fparam1%3Dtrue
就像是...
{
"id": 1,
"priority": 1,
"action": {
"type": "redirect",
"redirect": {
"url": `http://www.newsite.com?url=${encodeURIComponent(url)}`
}
}
}
这可能吗?如果没有,还有其他方法可以实现这一目标吗?
解决方案
推荐阅读
- c++ - 错误:三元运算符在“cout”对象中无法正常工作
- webrtc - 在使用带有 WebRTC 的 AWS Kinesis Video 流进行视频通话时保存视频
- loops - 循环没有迭代列表的最后一行
- r - 根据一个图中的不同列制作两个 geom_bar() 图
- symfony - 当我将 Messenger 组件与 Doctrine 一起使用时保留消息
- python - 使用 OpenCV 从车牌中分割字符
- three.js - Orbit Controls 不是构造函数
- r - 检查两个数据帧在 R 中的同一行和同一列是否具有相同的值
- mysql - 查询MySQL中的一系列连续事件
- php - 使用 PHP 和 FuelPHP MVC 框架在布尔值上调用成员函数 format()