Skip to content

Commit

Permalink
chore: added sec-ch-ua headers
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyhalight committed Jan 9, 2025
1 parent b139fb2 commit 0266993
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions packages/ext/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,31 @@ import VOTCoreClient, {
VOTWorkerClient as VOTCoreWorkerClient,
} from "@vot.js/core/client";
import type { VOTOpts } from "@vot.js/core/types/client";
import config from "@vot.js/shared/config";

const { componentVersion } = config;

export const secHeaders = {
"sec-ch-ua": `"Chromium";v="130", "YaBrowser";v="${componentVersion.slice(0, 5)}", "Not?A_Brand";v="99", "Yowser";v="2.5"`,
"sec-ch-ua-full-version-list": `"Chromium";v="130.0.6723.152", "YaBrowser";v="${componentVersion}", "Not?A_Brand";v="99.0.0.0", "Yowser";v="2.5"`,
};

export default class VOTClient extends VOTCoreClient {
constructor(opts?: VOTOpts) {
super(opts);
this.headers = {
...secHeaders,
...this.headers,
};
}
}

export class VOTWorkerClient extends VOTCoreWorkerClient {
constructor(opts?: VOTOpts) {
super(opts);
this.headers = {
...secHeaders,
...this.headers,
};
}
}

0 comments on commit 0266993

Please sign in to comment.