make mock insight api behave the same as real api by trying to fix #626 & #627

This commit is contained in:
Larry Salibra
2017-10-01 23:14:30 +08:00
parent d50c57872d
commit bb7ed0a86f

View File

@@ -3377,8 +3377,8 @@ class BlockstackAPIEndpointHandler(SimpleHTTPRequestHandler):
'GET': {
'name': 'wallet_read',
'desc': 'get the node wallet\'s balance',
'auth_session': True,
'auth_pass': True,
'auth_session': False,
'auth_pass': False,
'need_data_key': False,
},
}
@@ -3391,8 +3391,8 @@ class BlockstackAPIEndpointHandler(SimpleHTTPRequestHandler):
'GET': {
'name': 'wallet_read',
'desc': 'get the node wallet\'s balance',
'auth_session': True,
'auth_pass': True,
'auth_session': False,
'auth_pass': False,
'need_data_key': False,
},
}
@@ -3852,6 +3852,20 @@ class BlockstackAPIEndpointHandler(SimpleHTTPRequestHandler):
},
},
},
r'^/insight-api/.*$': {
'routes': {
'OPTIONS': self.OPTIONS_preflight,
},
'whitelist': {
'OPTIONS': {
'name': '',
'desc': 'preflight check',
'auth_session': False,
'auth_pass': False,
'need_data_key': False,
},
}
},
}
LOCALHOST = []