问题描述
X-Forwarded-Proto
HTTP 标头值的完整规范是什么?
What is a full specification of X-Forwarded-Proto
HTTP header values?
推荐答案
没有完整规范"——这是一个事实上的标准.标头名称前面的 X-
通常 将其表示为实验性/非标准/供应商特定.一旦它成为 HTTP 的标准部分,它就会丢失前缀.
There is no "full specification" -- it's a de facto standard. The X-
in front of a header name customarily has denoted it as experimental/non-standard/vendor-specific. Once it's a standard part of HTTP, it'll lose the prefix.
IETF 有一些关于标准化的工作,但据我所知,它还处于草稿阶段.查看 https://datatracker.ietf.org/doc/html/draft-ietf-appsawg-http-forwarded-10 获取撰写本文时的最新草案.但请注意,它在充实的过程中随时可能发生变化,暂时不要在生产中依赖它.
There's some work from the IETF on standardizing it, but it's just at the draft stages, as far as i can tell. Check out https://datatracker.ietf.org/doc/html/draft-ietf-appsawg-http-forwarded-10 for the latest draft as of the time of this writing. But be aware that it can change at any time while it's being fleshed out, and don't rely on it in production stuff yet.
更新:
RFC 7239 现在定义了 Forwarded:
标头,旨在替换 X-Forwarded-*
.如果您关心标准,我建议您改用它.
RFC 7239 now defines the Forwarded:
header, which is intended to replace X-Forwarded-*
. If you care about standards, i would recommend using that instead.
这篇关于X-Forwarded-Proto HTTP 标头的完整规范是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!