V
V
verycooldev2018-07-27 00:38:09
Nginx
verycooldev, 2018-07-27 00:38:09

Difference between $http_host and $host?

Some examples proxy_set_header Host $http_hostsay , others just $host
I can't google the difference?
I have a regular Node application behind a proxy. What to use and why?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
ky0, 2018-07-27
@ky0

First link on google:

Summarizing:
$http_host equals always the HTTP_HOST request header.
$host equals $http_host, lowercase and without the port number (if present), except when HTTP_HOST is absent or is an empty value. In that case, $host equals the value of the server_name directive of the server which processed the request.
https://stackoverflow.com/questions/15414810/whats...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question