X-Forwarded-For (XFF) HTTP 标头
X-Forwarded-For (XFF) HTTP 标头值可以有多少个字符?
例子是: X-Forwarded-For:客户端1、代理1、代理2
How many characters can the value of the X-Forwarded-For (XFF) HTTP header value be?
Example is:
X-Forwarded-For: client1, proxy1, proxy2
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
AFAIK,没有限制。请注意,您不应该依赖它的值;它很容易被欺骗。 (但请注意,如果您使用的负载平衡代理会覆盖此值,则您可以在自己设置时依赖它)
AFAIK, there is no limit. Note that you shouldn't rely on its value; it can be spoofed easily. (Note however that if you're using a load-balancing proxy that overwrites this value, you can rely on it as you're setting it yourself)
请参阅此,此 和 这个(相关的SO问题)。
该规范没有指定限制(因此,理论上是无限的)。但是,存在特定于实现的限制。
IIS 6/7 允许每个标头最多 16K,apache 将 默认为 8K。
See this, this and this (related SO questions).
The spec does not specify a limit (so, unlimited, in theory). However, there is a limit that is implementation specific.
IIS 6/7 allow up to 16K per header, apache will default to 8K.