REQUEST_SCHEME

X-Forwarded-Proto:、X-Forwarded-Scheme: ヘッダー (HTTP)

仕様書

Forwarded: ヘッダー proto 引数

[7] Forwarded: ヘッダーproto 引数は、 用いられているプロトコルの種類を表します >>6

[8] 値の構文は、 URL scheme です >>6

  1. URL scheme

[9] 典型的な値は httphttps です >>6

[10] 正規形であることは要求されていませんから、大文字で指定されていても良いことになります。

関連

[14] X-Forwarded-* 参照。

実装

[3] X-Forwarded-Proto: >>1, >>2, >>13

[5] X-Forwarded-Scheme: >>1, >>4, >>13

[11] Read X-Forwarded-Proto header if trustProxy flag set by stongo · Pull Request #1747 · hapijs/hapi ( ( 版)) <https://github.com/hapijs/hapi/pull/1747/files>

[12] Support X-Forwarded-Proto HTTP header [#313145] | Drupal.org ( ( 版)) <https://www.drupal.org/node/313145>

[13] ProxyHeaders uses X-Forwarded-Scheme, not X-Forwarded-Proto · Issue #79 · gorilla/handlers ( ()) <https://github.com/gorilla/handlers/issues/79>

[15] mod_rewrite - Apache HTTP Server Version 2.5 () <https://httpd.apache.org/docs/trunk/mod/mod_rewrite.html#RewriteCond>

HTTPS

Will contain the text "on" if the connection is using SSL/TLS, or "off" otherwise. (This variable can be safely used regardless of whether or not mod_ssl is loaded).

[16] mod_rewrite - Apache HTTP Server Version 2.5 () <https://httpd.apache.org/docs/trunk/mod/mod_rewrite.html#RewriteCond>

REQUEST_SCHEME

Will contain the scheme of the request (usually "http" or "https"). This value can be influenced with ServerName.

[17] nginx: 62869a9b2e7d () <http://hg.nginx.org/nginx/rev/62869a9b2e7d>

The REQUEST_SCHEME parameter was introduced in Apache 2.3.11 and seems

to be used by some scripts now. It looks more logical than previously

used HTTPS.