api: automatically pull youtube session tokens from a session server
if provided, cobalt will pull poToken & visitor_data from an instance of invidious' youtube-trusted-session-generator or its counterpart
This commit is contained in:
@@ -18,8 +18,10 @@ import { verifyTurnstileToken } from "../security/turnstile.js";
|
||||
import { friendlyServiceName } from "../processing/service-alias.js";
|
||||
import { verifyStream, getInternalStream } from "../stream/manage.js";
|
||||
import { createResponse, normalizeRequest, getIP } from "../processing/request.js";
|
||||
|
||||
import * as APIKeys from "../security/api-keys.js";
|
||||
import * as Cookies from "../processing/cookie/manager.js";
|
||||
import * as YouTubeSession from "../processing/helpers/youtube-session.js";
|
||||
|
||||
const git = {
|
||||
branch: await getBranch(),
|
||||
@@ -376,6 +378,10 @@ export const runAPI = async (express, app, __dirname, isPrimary = true) => {
|
||||
if (env.cookiePath) {
|
||||
Cookies.setup(env.cookiePath);
|
||||
}
|
||||
|
||||
if (env.ytSessionServer) {
|
||||
YouTubeSession.setup();
|
||||
}
|
||||
});
|
||||
|
||||
if (isCluster) {
|
||||
|
||||
Reference in New Issue
Block a user