cobalt/src/modules/stream/shared.js

21 lines
458 B
JavaScript
Raw Normal View History

2024-04-27 11:59:27 +01:00
import { genericUserAgent } from "../config.js";
const defaultHeaders = {
'user-agent': genericUserAgent
}
const serviceHeaders = {
bilibili: {
referer: 'https://www.bilibili.com/'
},
youtube: {
accept: '*/*',
origin: 'https://www.youtube.com',
referer: 'https://www.youtube.com',
DNT: '?1'
}
}
export function getHeaders(service) {
return { ...defaultHeaders, ...serviceHeaders[service] }
}