diff --git a/docs/changelog.rst b/docs/changelog.rst index f28bd8e9..82000ed6 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -4,6 +4,18 @@ Changelog This changelog is used to track all major changes to Mopidy. + +v0.19.2 (UNRELEASED) +==================== + +Bug fix release. + +**HTTP** + +- When using Tornado 4.0, allow WebSocket requests from other hosts. (Fixes: + :issue:`788`) + + v0.19.1 (2014-07-23) ==================== diff --git a/mopidy/http/handlers.py b/mopidy/http/handlers.py index f35b5c7c..e212c77d 100644 --- a/mopidy/http/handlers.py +++ b/mopidy/http/handlers.py @@ -112,6 +112,11 @@ class WebSocketHandler(tornado.websocket.WebSocketHandler): logger.error('WebSocket request error: %s', e) self.close() + def check_origin(self, origin): + # Allow cross-origin WebSocket connections, like Tornado before 4.0 + # defaulted to. + return True + def set_mopidy_headers(request_handler): request_handler.set_header('Cache-Control', 'no-cache')