Anuj-Panthri commited on
Commit
6b35acc
·
1 Parent(s): 6272afd

fixed a small mistake

Browse files
Files changed (1) hide show
  1. index.js +5 -0
index.js CHANGED
@@ -100,6 +100,11 @@ const getScreenshot = async (url, headers = null) => {
100
  const browser = await initBrowser;
101
  var page = await browser.newPage();
102
 
 
 
 
 
 
103
  await page.goto(url, {
104
  waitUntil: "domcontentloaded",
105
  });
 
100
  const browser = await initBrowser;
101
  var page = await browser.newPage();
102
 
103
+ if (headers) {
104
+ // console.log("headers",headers);
105
+ await page.setExtraHTTPHeaders(headers);
106
+ }
107
+
108
  await page.goto(url, {
109
  waitUntil: "domcontentloaded",
110
  });