Skip to content

Commit

Permalink
Allow both HTTP and WebSocket on a single rule
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel Collins committed Jul 29, 2020
1 parent 93786b2 commit 25e13f5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/flask_threaded_sockets/flask.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,7 @@ def wsgi_app(self, environ, start_response):

# Handle environment
if not environ.get("wsgi.websocket"):
start_response("400 Bad Request", [("Connection", "close")])
return [b"The requested URL will only accept websocket connections"]
return self.app_wsgi_app(environ, start_response)

ws = environ["wsgi.websocket"]

Expand Down

0 comments on commit 25e13f5

Please sign in to comment.