diff --git a/index.ts b/index.ts index f7728b5..a690039 100644 --- a/index.ts +++ b/index.ts @@ -22,7 +22,13 @@ app.get("/", (req, res) => { return } - got(`${searchEngine}?q=${query}`) + const options = { + headers: { + 'user-agent': req.headers["user-agent"] + } + } + + got(`${searchEngine}?q=${query}`, options) .then((response) => { if (response.statusCode !== 200) {