Allow CORS requests to token endpoint (#15519)

* Allow CORS requests to token endpoint

* Tests

* Fuck emulated hue

* Clean up

* Only cors existing methods
This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2018-07-19 08:37:00 +02:00
1 parent 22d961de70
commit 2a76a0852f
9 files changed
+59 -23

No files matched your search

@@ -241,6 +241,7 @@ class GrantTokenView(HomeAssistantView):
url = '/auth/token'
name = 'api:auth:token'
requires_auth = False
cors_allowed = True
def __init__(self, retrieve_credentials):
"""Initialize the grant token view."""