mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-15 04:39:58 +00:00
api/config: add cobalt user agent
This commit is contained in:
parent
f3521da9c1
commit
4478a963c5
1 changed files with 6 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
import { getVersion } from "@imput/version-info";
|
||||
import { services } from "./processing/service-config.js";
|
||||
|
||||
const genericUserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36";
|
||||
const version = await getVersion();
|
||||
|
||||
const disabledServices = process.env.DISABLED_SERVICES?.split(',') || [];
|
||||
const enabledServices = new Set(Object.keys(services).filter(e => {
|
||||
|
@ -40,7 +41,11 @@ const env = {
|
|||
enabledServices,
|
||||
}
|
||||
|
||||
const genericUserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36";
|
||||
const cobaltUserAgent = `cobalt/${version} (+https://github.com/imputnet/cobalt)`;
|
||||
|
||||
export {
|
||||
env,
|
||||
genericUserAgent,
|
||||
cobaltUserAgent,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue