When nginx server is configured this way:
server {
listen 80;
listen 443 ssl;
server_name www.example.org;
...
}
how can be detected that the request came via HTTP or HTTPS?
(E.g. $http_port
is unusable, because the port is not specified explicitly, therefore it's empty)