updated with oauth, footer docs,
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user