由于某种原因,sub_filter
与fastcgi_pass
不兼容,在我的案例中,该location /proxy/
sub_filter '<a href="http://' '<a href="//';
sub_filter_once off;
fastcgi_pass proxy:8002;
fastcgi_split_path_info ^(/proxy)(/?.*)$;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
include fastcgi_params;
fastcgi_buffers 256 4k;
fastcgi_intercept_errors on;
fastcgi_read_timeout 14400;
}
指向perl中的CGI脚本。
如果我尝试将sub_filter应用于静态HTML,则一切正常,并且可以按预期交换hrefs。
这是配置:
X3= (X1/X2)
= ((-1)^S1 (M1 x 2E1)) / ((-1) S2 (M2 x 2E2))
= (-1)^S3 (M1/M2) 2 (E1-E2)