Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
外部イメージをダウンロードしてローカルに保存せずにnginxでプロキシする方法はありますか? URIつまり、次のように画像をプロキシ サーバーに渡します。
URI
`http://myproxydomain.com/http://example.com/image.jpg`
そして、これを私のサイトの画像URIの属性に含めます。src
src
はい-これは可能です:
merge_slashes off; location ~ /(?<r>http://.*) { resolver 127.0.0.1; proxy_pass $r; }
あなたがそれをすべきかどうかは別の問題です。持っmerge_slashes offているのは良い考えではないかもしれません。
merge_slashes off