Skip to content

Instantly share code, notes, and snippets.

@noxecane
Created June 24, 2019 21:08
Show Gist options
  • Save noxecane/4ae4750d6a13248dd22bff11717ff965 to your computer and use it in GitHub Desktop.
Save noxecane/4ae4750d6a13248dd22bff11717ff965 to your computer and use it in GitHub Desktop.
Proxy to a service
server {
listen [::]:443 ssl http2; # and this
listen 443 ssl http2; # change this
# The host name to respond to
server_name localhost;
location /api/v1/account/ {
proxy_pass http://localhost:3008;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 900;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment