我想向内部图生成器提供静态的URL,而不从客户端传递潜在的恶意查询参数。
我有一个
VirtualHost
看起来有点像这样的配置
<VirtualHost *:443>
# ServerName, ServerAlias, SSLEngine, SSLCertificate...
SSLProxyEngine on
ProxyPass /graph/great-graph1.png https://some.internal.host/the-graph.png?width=..&height=..&<more params>
ProxyPass /graph/great-graph2.png https://other.internal.host/the-graph.png?width=..&height=..&<more params>
</VirtualHost>
它几乎可以随心所欲地工作。图形是从正确的主机加载的,但有两件事不起作用:
-
配置的查询参数将被忽略
-
客户端提供的查询参数将传递给内部主机
我试着添加
noquery
到的行的末尾
ProxyPass
其中提到了它的存在
here
但没有任何效果。
我还尝试了各种
RewriteRule
s(已启用
RewriteEngine
)但我也无法找出正确的方法。