mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-22 01:26:57 +03:00
📝 docs updated after review
This commit is contained in:
parent
286363799c
commit
7ba61274ce
|
@ -4,7 +4,7 @@
|
|||
Websocket
|
||||
=========
|
||||
|
||||
You can enable web sockets if you select ``use_async`` option when creating a project. That indicates whether the project should use web sockets with Uvicorn + Gunicorn.
|
||||
You can enable web sockets if you select ``use_async`` option when creating a project. That indicates whether the project can use web sockets with Uvicorn + Gunicorn.
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
@ -19,14 +19,7 @@ JavaScript example: ::
|
|||
undefined
|
||||
pong!
|
||||
|
||||
If you are using nGinx instead of Traefik, you should add these lines to nGinx config: ::
|
||||
|
||||
location /websocket/ {
|
||||
proxy_pass http://backend;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_read_timeout 86400;
|
||||
}
|
||||
If you don't use Traefik, you might have to configure your reverse proxy accordingly (example with Nginx_).
|
||||
|
||||
Source: https://www.nginx.com/blog/websocket-nginx/
|
||||
.. _Nginx: https://www.nginx.com/blog/websocket-nginx/
|
||||
|
|
Loading…
Reference in New Issue
Block a user