输入您想访问的网址
目标网址
跨域模式
默认 any
any
domain
subdomain
tdomain
tsubdomain
访问
说明
假设当前网页是
https://app.example.com
, Worker 域名是
https://proxy.example.com
, 目标网址是
https://api.target.com/
。
/https://api.target.com/
->
Access-Control-Allow-Origin: *
/any/https://api.target.com/
->
Access-Control-Allow-Origin: *
/domain/https://api.target.com/
->
Access-Control-Allow-Origin: https://example.com
/subdomain/https://api.target.com/
->
Access-Control-Allow-Origin: https://app.example.com
/tdomain/https://api.target.com/
->
Access-Control-Allow-Origin: https://target.com
/tsubdomain/https://api.target.com/
->
Access-Control-Allow-Origin: https://api.target.com
修改请求头
使用
/mh/{x-header-name}/目标网址
可以把请求头
x-header-name
的值转发为
header-name
,并删除原来的
x-header-name
。
/mh/x-user-agent/https://api.target.com/
->
x-user-agent 替换为 user-agent
/any/mh/x-user-agent/https://api.target.com/
->
Access-Control-Allow-Origin: *,并将 x-user-agent 替换为 user-agent