mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-04-24 03:45:38 +08:00
adds origin headers to RESTful integration tests
This commit is contained in:
@@ -2226,8 +2226,11 @@ def blockstack_REST_call( method, route, session, api_pass=None, app_fqu=None, a
|
||||
headers = {}
|
||||
if session:
|
||||
headers['authorization'] = 'bearer {}'.format(session)
|
||||
app_domain = jsontokens.decode_token(session)["payload"]["app_domain"]
|
||||
headers['origin'] = "http://{}".format(app_domain)
|
||||
elif api_pass:
|
||||
headers['authorization'] = 'bearer {}'.format(api_pass)
|
||||
headers['origin'] = 'http://localhost:3000'
|
||||
|
||||
assert not (data and raw_data), "Multiple data given"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user