Add map directive to the base of nginx.conf
This needs to be added for WebSocket upgrades to work properly (see doc: http://nginx.org/en/docs/http/websocket.html)
This commit is contained in:
		| @@ -45,6 +45,11 @@ http { | |||||||
| 	keepalive_timeout 65; | 	keepalive_timeout 65; | ||||||
|  |  | ||||||
| 	#gzip on; | 	#gzip on; | ||||||
|  | 	{# Map directive needed for proxied WebSocket upgrades #} | ||||||
|  | 	map $http_upgrade $connection_upgrade { | ||||||
|  | 		default upgrade; | ||||||
|  | 		''      close; | ||||||
|  | 	} | ||||||
|  |  | ||||||
| 	include /etc/nginx/conf.d/*.conf; | 	include /etc/nginx/conf.d/*.conf; | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user