From 065759d1b898c062b5d464cd9e03ce749b5034aa Mon Sep 17 00:00:00 2001 From: "Calum H." Date: Sun, 19 Apr 2026 00:55:57 +0100 Subject: [PATCH] fix: window on ssr error + cors problem with launcher meta (#5856) --- .../src/modules/launcher-meta/v0.ts | 6 ++++++ packages/ui/src/components/chart/Chart.vue | 19 +++++++++++++++++-- .../ui/src/components/chart/CompactChart.vue | 10 +++++++++- .../manage/components/ServerManageStats.vue | 11 +++++++++-- 4 files changed, 41 insertions(+), 5 deletions(-) diff --git a/packages/api-client/src/modules/launcher-meta/v0.ts b/packages/api-client/src/modules/launcher-meta/v0.ts index 6edb0db83..f4d6ff0e3 100644 --- a/packages/api-client/src/modules/launcher-meta/v0.ts +++ b/packages/api-client/src/modules/launcher-meta/v0.ts @@ -13,6 +13,11 @@ export class LauncherMetaManifestV0Module extends AbstractModule { /** * Get the loader manifest for a given loader platform. * + * launcher-meta refuses CORS preflights that ask for the `Content-Type` + * header (returns 403), so we strip the default `Content-Type: application/json` + * the abstract client sets — these are body-less GETs and don't need it. + * Without this the browser preflight is rejected and the GET never fires. + * * @param loader - Loader platform (fabric, forge, quilt, neo) */ public async getManifest(loader: string): Promise { @@ -21,6 +26,7 @@ export class LauncherMetaManifestV0Module extends AbstractModule { version: `${loader}/v0`, method: 'GET', skipAuth: true, + headers: { 'Content-Type': '' }, }) } } diff --git a/packages/ui/src/components/chart/Chart.vue b/packages/ui/src/components/chart/Chart.vue index c456f56e6..43c11e1fb 100644 --- a/packages/ui/src/components/chart/Chart.vue +++ b/packages/ui/src/components/chart/Chart.vue @@ -1,13 +1,21 @@