mirror of
https://github.com/cupcakearmy/blaze.git
synced 2024-12-23 00:36:26 +00:00
Try to add user agent
This commit is contained in:
parent
a877a474d5
commit
2336b29642
8
index.ts
8
index.ts
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user