Merge pull request #4463 from maschwanden/master

Daemon: Fix preflight CORS request handling
This commit is contained in:
ThomasV 2018-06-26 17:09:13 +02:00 committed by GitHub
commit f24a449d37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -58,6 +58,9 @@ class VerifyingJSONRPCServer(SimpleJSONRPCServer):
# first, call the original implementation which returns
# True if all OK so far
if SimpleJSONRPCRequestHandler.parse_request(myself):
# Do not authenticate OPTIONS-requests
if myself.command.strip() == 'OPTIONS':
return True
try:
self.authenticate(myself.headers)
return True