X-Forwarded-Proto HTTP 标头的完整规范是什么? [英] What is a full specification of X-Forwarded-Proto HTTP header?

查看:21
本文介绍了X-Forwarded-Proto HTTP 标头的完整规范是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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.

* 这曾经是官方的,但现在不再是.RFC 6648 弃用了 X- 前缀约定.不幸的是,该约定是如此广为人知(并且弃用如此低调),以至于 IETF 以外的大多数人可能会忽略该建议.

* This used to be an official thing, but no longer is. RFC 6648 deprecates the X- prefixing convention. Unfortunately, the convention is so widely known (and the deprecation so low-key) that most people outside the IETF will probably ignore the recommendation.

这篇关于X-Forwarded-Proto HTTP 标头的完整规范是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆