Skip to content

Commit b20972d

Browse files
committed
fix: Add X-Session-ID on normal api calls
1 parent 642f8b1 commit b20972d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/util/api.ts

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { Packr, Unpackr, addExtension } from "msgpackr";
22
import { APIResponse } from "./types";
33

4+
const cacheSessionID = `SESS-${Math.floor(Math.random() * Number.MAX_SAFE_INTEGER)}`;
5+
46
const cache: Map<string, { expire: number; data: any }> = new Map();
57

68
addExtension({
@@ -68,6 +70,7 @@ export default async function (
6870

6971
let headers: any = {
7072
Accept: "application/vnd.osk.theorypack",
73+
"X-Session-ID": cacheSessionID,
7174
...headers_,
7275
};
7376

0 commit comments

Comments
 (0)