0ec39a5da9
corsFetch is used to requesting license server that requires Origin header. Pyfetch does not retain the Origin header due to browser security restrictions. This change will make it easier to create schemes using corsFetch API.
6 lines
266 B
Python
6 lines
266 B
Python
req = json.loads(base64.b64decode(licBody.encode()).decode())
|
|
b64challenge = base64.b64encode(challenge).decode()
|
|
req['licenseRequest'] = b64challenge
|
|
res = await corsFetch(licUrl, "POST", licHeaders, req, "json")
|
|
licence = base64.b64decode(res['license'].encode())
|