Skip to content

Instantly share code, notes, and snippets.

@eyakcn
Created February 19, 2016 08:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eyakcn/ac328a40805a820b09c1 to your computer and use it in GitHub Desktop.
Save eyakcn/ac328a40805a820b09c1 to your computer and use it in GitHub Desktop.
location … {
if ($http_x_real_ip != ''){
set $clientip $http_x_real_ip;
break;
}
if ($http_x_real_ip = ''){
set $clientip $remote_addr;
break;
}
proxy_set_header X-Real-IP $clientip;
}
location ^~ /api/stomp {
proxy_pass http://tomcat:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade "websocket";
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment