Skip to content

Commit

Permalink
Added 'add_trailing_slash' option to WSGIApp and ASGIApp init definit…
Browse files Browse the repository at this point in the history
…ions to be in concordance with this same option being added to engineio
  • Loading branch information
imcarlosguerrero committed Jul 6, 2024
1 parent 3a618c6 commit d61667e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/socketio/asgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ class ASGIApp(engineio.ASGIApp): # pragma: no cover
"""
def __init__(self, socketio_server, other_asgi_app=None,
static_files=None, socketio_path='socket.io',
on_startup=None, on_shutdown=None):
on_startup=None, on_shutdown=None, add_trailing_slash=True):
super().__init__(socketio_server, other_asgi_app,
static_files=static_files,
engineio_path=socketio_path, on_startup=on_startup,
on_shutdown=on_shutdown)
on_shutdown=on_shutdown, add_trailing_slash=add_trailing_slash)
4 changes: 2 additions & 2 deletions src/socketio/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ class WSGIApp(engineio.WSGIApp):
eventlet.wsgi.server(eventlet.listen(('', 8000)), app)
"""
def __init__(self, socketio_app, wsgi_app=None, static_files=None,
socketio_path='socket.io'):
socketio_path='socket.io', add_trailing_slash=True):
super().__init__(socketio_app, wsgi_app, static_files=static_files,
engineio_path=socketio_path)
engineio_path=socketio_path, add_trailing_slash=add_trailing_slash)


class Middleware(WSGIApp):
Expand Down

0 comments on commit d61667e

Please sign in to comment.