added hmac auth to report route

Co-authored-by: timvisee <tim@visee.me>
This commit is contained in:
Danny Coates
2020-07-25 15:36:09 -07:00
committed by timvisee
parent bc0ccc8e5d
commit f64e772145
3 changed files with 10 additions and 3 deletions

View File

@@ -61,7 +61,10 @@ async function fetchWithAuth(url, params, keychain) {
const result = {};
params = params || {};
const h = await keychain.authHeader();
params.headers = new Headers({ Authorization: h });
params.headers = new Headers({
Authorization: h,
'Content-Type': 'application/json'
});
const response = await fetch(url, params);
result.response = response;
result.ok = response.ok;