我正在尝试反向代理cPanel的WHM API,目前我可以调用它并获得会话链接。问题是我想在输出之前更改链接
我在服务器块中有这个
location / {
proxy_set_header Accept-Encoding "";
access_log /var/log/test.log upstream_logging;
proxy_pass_header Authorization;
proxy_pass https://$upstream;
proxy_set_header Host old.domain:2087;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_buffering off;
client_max_body_size 0;
proxy_read_timeout 10000s;
proxy_cookie_domain old.domain new.domain;
proxy_redirect off;
sub_filter_types plain/text;
sub_filter old.domain new.domain;
sub_filter_once off;
}
但是,当我调用API时,不会发生替换。