diff options
| author | Fuwn <[email protected]> | 2026-03-22 03:45:51 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-03-22 03:50:07 +0000 |
| commit | a1a747d6b46cc653f1716f6f71cf02284b0f20cd (patch) | |
| tree | 01c0e6f9bcef809efc07f7a1032f49b9d58e8faa /src/routes/api/preferences/pin | |
| parent | refactor: extract app origin config (diff) | |
| download | due.moe-a1a747d6b46cc653f1716f6f71cf02284b0f20cd.tar.xz due.moe-a1a747d6b46cc653f1716f6f71cf02284b0f20cd.zip | |
refactor: centralise site origin usage
Diffstat (limited to 'src/routes/api/preferences/pin')
| -rw-r--r-- | src/routes/api/preferences/pin/+server.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/routes/api/preferences/pin/+server.ts b/src/routes/api/preferences/pin/+server.ts index 045d0187..45a231fd 100644 --- a/src/routes/api/preferences/pin/+server.ts +++ b/src/routes/api/preferences/pin/+server.ts @@ -1,6 +1,7 @@ import { userIdentity } from "$lib/Data/AniList/identity"; import { decodeAuthCookieOrThrow } from "$lib/Effect/authCookie"; import { toggleHololiveStreamPinning } from "$lib/Database/SB/User/preferences"; +import { appOriginHeaders } from "$lib/Utility/appOrigin"; const unauthorised = new Response("Unauthorised", { status: 401 }); @@ -17,10 +18,9 @@ export const PUT = async ({ cookies, url }) => { url.searchParams.get("stream") || "", ), { - headers: { + headers: appOriginHeaders({ method: "PUT", - "Access-Control-Allow-Origin": "https://due.moe", - }, + }), }, ); }; |