3
有没有办法使用nginx代理外部图像,而无需在本地下载和存储它们?即通过图像的URI
到我的代理服务器是这样的:nginx代理服务器外部图像
`http://myproxydomain.com/http://example.com/image.jpg`
及包括本URI
在src
属性为我的网站上的图像。
有没有办法使用nginx代理外部图像,而无需在本地下载和存储它们?即通过图像的URI
到我的代理服务器是这样的:nginx代理服务器外部图像
`http://myproxydomain.com/http://example.com/image.jpg`
及包括本URI
在src
属性为我的网站上的图像。
是 - 这是可能的:
merge_slashes off;
location ~ /(?<r>http://.*) {
resolver 127.0.0.1;
proxy_pass $r;
}
无论你应该做的又是另外一回事。有merge_slashes off
可能不是一个好主意。