Skip to content

Commit

Permalink
update CORS documentation (Fixes #327)
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Aug 2, 2019
1 parent 659a51e commit 6848bed
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 5 additions & 3 deletions socketio/asyncio_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 5 additions & 3 deletions socketio/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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``.
Expand Down

0 comments on commit 6848bed

Please sign in to comment.