Try to add user agent

This commit is contained in:
Danny Spina 2023-06-19 12:40:07 +02:00
parent a877a474d5
commit 2336b29642

View File

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