mopidy/tests/http
Nick Steel 6e9ed9e8a9 http: allow local files to access websocket (Fixes #1711)
check_origin() still ensures the Origin header is set but now only blocks
when missing from the allowed list *if* a network location was extracted
from the header. This prevents websocket connections originating from
local files (common in Apache Cordova apps such as Mopidy-Mobile) from
being blocked; these files don't really have a sensible value for Origin
so the client browser sets the header to something like 'file://' or
'null'.

Also added some tests for check_origin().
2018-10-08 23:39:47 +01:00
..
__init__.py http: Move mopidy.{frontends => }.http 2013-12-31 14:04:25 +01:00
test_events.py tests: Cleanup reset_mock() usage 2015-05-06 21:06:30 +02:00
test_handlers.py http: allow local files to access websocket (Fixes #1711) 2018-10-08 23:39:47 +01:00
test_server.py HTTP: New RPC CORS tests and fixed existing. 2018-04-15 17:12:16 +01:00