【发布时间】:2017-11-21 03:52:02
【问题描述】:
我的配置中有以下内容作为图像的反向代理:
location ~ ^/image/(.+) {
proxy_pass http://example.com/$1;
}
问题在于并非所有图片都是 example.com 图片,因此我们需要传入完整的 url。如果我尝试:
location ~ ^/image/(.+) {
proxy_pass $1;
}
我收到一个错误:
invalid URL prefix in "https:/somethingelse.com/someimage.png"
【问题讨论】:
-
当它指向其他域时,您将使用的 url 是什么?
标签: nginx reverse-proxy nginx-reverse-proxy