1
0
Fork 0
mirror of https://git.sr.ht/~cadence/cloudtube synced 2026-05-26 12:32:25 +00:00

Set user-agent for invidious.snopyta ID

This commit is contained in:
Cadence Ember 2021-01-12 23:49:00 +13:00
parent c419aa90da
commit 98ee77def4
No known key found for this signature in database
GPG key ID: BC1C2C61CF521B17
5 changed files with 21 additions and 6 deletions

11
utils/request.js Normal file
View file

@ -0,0 +1,11 @@
const fetch = require("node-fetch")
function request(url, options = {}) {
if (!options.headers) options.headers = {}
options.headers = {
"user-agent": "CloudTubeBackend/1.0"
}
return fetch(url, options)
}
module.exports.request = request