upstream uds_server { server unix:/run/openuds/socket fail_timeout=10s; } map $http_x_forwarded_proto $thescheme { default $scheme; https https; }