From 980538b26a70d38e0f671fc329cb7601e0f3c398 Mon Sep 17 00:00:00 2001 From: Carlos Tadeu Panato Junior Date: Sat, 9 Mar 2024 22:59:03 +0100 Subject: [PATCH] Add Accept header for github revoke token (#13) following the best practice from github that says that need to pass this header Signed-off-by: Carlos Tadeu Panato Junior --- post.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/post.js b/post.js index 4d9e019..b362a4c 100644 --- a/post.js +++ b/post.js @@ -9,7 +9,10 @@ if (!tok) { try { const res = await fetch('https://api.github.com/installation/token', { method: 'DELETE', - headers: { 'Authorization': `Bearer ${tok}` }, + headers: { + 'Authorization': `Bearer ${tok}`, + 'Accept': 'application/vnd.github+json', + }, }); if (res.status == 204) {