Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

特性一:扩展重定向功能优先级高于浏览器请求动作 #140

Open
jingjingxyk opened this issue Dec 31, 2022 · 0 comments
Open

Comments

@jingjingxyk
Copy link
Contributor

jingjingxyk commented Dec 31, 2022

浏览器请求动作之前,先执行扩展规则

例子:对一个未配置域名解析的地址,设置规则,然后用浏览器请求该域名,发现扩展规则已经生效了。

设置的规则例子


[
  {
    "id": 1,
    "priority": 1,
    "action": {
      "type": "redirect",
      "redirect": {
        "extensionPath": "/sandbox/index.html"
      }
    },
    "condition": {
      "urlFilter": "chromium-extensions.jingjingxyk.com",
      "requestDomains": ["chromium-extensions.jingjingxyk.com"],
      "resourceTypes": ["main_frame"]
    }
  }
]

使用浏览器请求 该 地址: http://chromium-extensions.jingjingxyk.com ,直接跳转到扩展提供的页面

规则例子源文件

@jingjingxyk jingjingxyk changed the title 特性一:扩展重定向优先级高于浏览器请求动作(浏览器请求动作之前,先执行扩展规则) 特性一:扩展重定向优先级高于浏览器请求动作 Dec 31, 2022
@jingjingxyk jingjingxyk changed the title 特性一:扩展重定向优先级高于浏览器请求动作 特性一:扩展重定向功能优先级高于浏览器请求动作 Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant