Handle token

This commit is contained in:
Owen 2025-08-13 17:30:59 -07:00
parent 2c8bf4f18c
commit dc50190dc3
No known key found for this signature in database
GPG key ID: 8271FDFFD9E0CCBD
7 changed files with 232 additions and 83 deletions

View file

@ -5,6 +5,7 @@ import logger from "@server/logger";
import * as yaml from "js-yaml";
import axios from "axios";
import { db, exitNodes } from "@server/db";
import { tokenManager } from "./tokenManager";
export class TraefikConfigManager {
private intervalId: NodeJS.Timeout | null = null;
@ -162,7 +163,8 @@ export class TraefikConfigManager {
} | null> {
try {
const resp = await axios.get(
`${config.getRawConfig().hybrid?.endpoint}/get-traefik-config`
`${config.getRawConfig().hybrid?.endpoint}/traefik-config`,
await tokenManager.getAuthHeader()
);
if (resp.status !== 200) {