commit f24a449d376f2cd33fe53566a4ce79a198d0ba79
parent 4dcefa7d3b937c5e36148ee30566a096a4526b0d
Author: ThomasV <thomasv@electrum.org>
Date: Tue, 26 Jun 2018 17:09:13 +0200
Merge pull request #4463 from maschwanden/master
Daemon: Fix preflight CORS request handling
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/lib/jsonrpc.py b/lib/jsonrpc.py
@@ -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