Skip to content

Instantly share code, notes, and snippets.

@spawn-guy
Forked from wearhere/enable-websockets.config
Created March 3, 2017 13:52
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 spawn-guy/4a6bf8835f10d4b7624a8eb7459ee5b4 to your computer and use it in GitHub Desktop.
Save spawn-guy/4a6bf8835f10d4b7624a8eb7459ee5b4 to your computer and use it in GitHub Desktop.
Patches AWS Elastic Beanstalk's default nginx configuration to support websockets, for use with an Application Load Balancer.
container_commands:
enable_websockets:
command: |
sed -i '/\s*proxy_set_header\s*Connection/c \
proxy_set_header Upgrade $http_upgrade;\
proxy_set_header Connection "upgrade";\
' /tmp/deployment/config/#etc#nginx#conf.d#00_elastic_beanstalk_proxy.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment