0
0
Fork 0
mirror of https://github.com/healthchecks/healthchecks.git synced 2025-04-08 14:40:05 +00:00

Improve the X-Forwarded-Proto note

cc: 
This commit is contained in:
Pēteris Caune 2022-01-24 15:58:24 +02:00
parent e5ac8d7dbc
commit 622755f7aa
No known key found for this signature in database
GPG key ID: E28D7679E9A9EDE2
3 changed files with 25 additions and 7 deletions

View file

@ -39,5 +39,12 @@ put a TLS-terminating reverse proxy in front of it.
header to determine if a request is secure or not. Make sure your TLS-terminating
reverse proxy:
* strips the X-Forwarded-Proto header from all incoming requests
* sets the X-Forwarded-Proto header to "https" only for requests that come via HTTPS
* Discards the X-Forwarded-Proto header sent by the end user.
* Sets the X-Forwarded-Proto header value to match the protocol of the original request
("http" or "https").
For example, in NGINX you can use the `$scheme` variable like so:
```
proxy_set_header X-Forwarded-Proto $scheme;
```

View file

@ -45,6 +45,10 @@ put a TLS-terminating reverse proxy in front of it.</p>
header to determine if a request is secure or not. Make sure your TLS-terminating
reverse proxy:</p>
<ul>
<li>strips the X-Forwarded-Proto header from all incoming requests</li>
<li>sets the X-Forwarded-Proto header to "https" only for requests that come via HTTPS</li>
</ul>
<li>Discards the X-Forwarded-Proto header sent by the end user.</li>
<li>Sets the X-Forwarded-Proto header value to match the protocol of the original request
("http" or "https").</li>
</ul>
<p>For example, in NGINX you can use the <code>$scheme</code> variable like so:</p>
<div class="highlight"><pre><span></span><code>proxy_set_header X-Forwarded-Proto $scheme;
</code></pre></div>

View file

@ -43,5 +43,12 @@ put a TLS-terminating reverse proxy in front of it.
header to determine if a request is secure or not. Make sure your TLS-terminating
reverse proxy:
* strips the X-Forwarded-Proto header from all incoming requests
* sets the X-Forwarded-Proto header to "https" only for requests that come via HTTPS
* Discards the X-Forwarded-Proto header sent by the end user.
* Sets the X-Forwarded-Proto header value to match the protocol of the original request
("http" or "https").
For example, in NGINX you can use the `$scheme` variable like so:
```text
proxy_set_header X-Forwarded-Proto $scheme;
```