基于请求标头的条件 Lighttpd 配置
是否可以根据自定义请求标头有条件地配置 Lighttpd?
可以通过IP地址(和其他变量)来做到这一点:
$HTTP["remoteip"] == "0.0.0.0" {
// Do something
}
是否有类似的请求标头,例如:
$HTTP["X-Some-Header"] == "Value" {
// Do something
}
我不认为有查看文档和搜索Google,但也许有人知道一种方法。
谢谢
Is it possible to conditionally configure Lighttpd based on custom request headers?
It's possible to do so by IP address (and other variables):
$HTTP["remoteip"] == "0.0.0.0" {
// Do something
}
Is there something similar for request headers, for example:
$HTTP["X-Some-Header"] == "Value" {
// Do something
}
I don't think there is looking through documentation and searching Google, but perhaps somebody knows a way.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
经过更多搜索后,我非常有信心这是不可能的。
对我来说,解决方案是更改我的应用程序。
Following more searching I'm pretty confident that this isn't possible.
For me the solution was to change my application.
从 1.4.6 开始,您可以使用 Lighttpd 执行此操作,请参阅 https://redmine。 lighttpd.net/projects/1/wiki/docs_configuration
在我的例子中,它看起来像:
You can do this with with Lighttpd from 1.4.6 onwards, see https://redmine.lighttpd.net/projects/1/wiki/docs_configuration
In my case it looks something like: