Browse Source

update CORS documentation (Fixes #327)

pull/348/head
Miguel Grinberg 6 years ago
parent
commit
6848bed1d7
No known key found for this signature in database GPG Key ID: 36848B262DF5F06C
  1. 8
      socketio/asyncio_server.py
  2. 8
      socketio/server.py

8
socketio/asyncio_server.py

@ -51,9 +51,11 @@ class AsyncServer(server.Server):
is greater than this value.
:param cookie: Name of the HTTP cookie that contains the client session
id. If set to ``None``, a cookie is not sent to the client.
:param cors_allowed_origins: List of origins that are allowed to connect
to this server. All origins are allowed by
default.
:param cors_allowed_origins: Origin or list of origins that are allowed to
connect to this server. Only the same origin
is allowed by default. Set this argument to
``'*'`` to allow all origins, or to ``[]`` to
disable CORS handling.
:param cors_credentials: Whether credentials (cookies, authentication) are
allowed in requests to this server.
:param engineio_logger: To enable Engine.IO logging set to ``True`` or pass

8
socketio/server.py

@ -78,9 +78,11 @@ class Server(object):
:param cookie: Name of the HTTP cookie that contains the client session
id. If set to ``None``, a cookie is not sent to the client.
The default is ``'io'``.
:param cors_allowed_origins: List of origins that are allowed to connect
to this server. All origins are allowed by
default.
:param cors_allowed_origins: Origin or list of origins that are allowed to
connect to this server. Only the same origin
is allowed by default. Set this argument to
``'*'`` to allow all origins, or to ``[]`` to
disable CORS handling.
:param cors_credentials: Whether credentials (cookies, authentication) are
allowed in requests to this server. The default is
``True``.

Loading…
Cancel
Save