updated with oauth, footer docs,

This commit is contained in:
2021-11-30 07:22:07 +00:00
parent f9f7b777e7
commit af5354d19f
32 changed files with 4790 additions and 250 deletions
+21
View File
@@ -123,7 +123,28 @@ export const getServerSideProps = wrapper.getServerSideProps(
async ({ query, req, res }) => {
console.log("query-", query);
res.setHeader(
"Cache-Control",
"public, s-maxage=10, stale-while-revalidate=59"
);
let token = await getToken();
var tokenIssuedAt = new Date();
var tokenExpiryTimeAt = new Date();
tokenExpiryTimeAt.setSeconds(
tokenExpiryTimeAt.getSeconds() + token.expires_in
);
console.log(
"token issued:",
tokenIssuedAt.toUTCString(),
"\n",
"token expires:",
tokenExpiryTimeAt.toUTCString()
);
console.log(token);
token = token.access_token;
let searchResultsObj = await getBasicDNSSearch(token);