From 238ec6e254f95d4501799acb5a526258554121b5 Mon Sep 17 00:00:00 2001 From: Liam Date: Sat, 19 Oct 2024 03:50:29 +0100 Subject: [PATCH] don't proxy requests that happen on the server --- bun.lockb | Bin 364560 -> 364560 bytes projects/common/src/service/service.ts | 3 ++- .../player/player-steam-profile.tsx | 2 -- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/bun.lockb b/bun.lockb index cc078bfe2f4baba23cde2c546748025830c04544..6aa74d02b541761a12a47b2eb14e097230a0eb35 100755 GIT binary patch delta 33 pcmbQRKy1PSv4$4L7N#xC>zA@K#+m9F>lw6fTgtqB+ftUOR{+n@47>mU delta 33 mcmbQRKy1PSv4$4L7N#xC>zA@KF@Qn)wx!J5w=HFfdIbQzlM8DA diff --git a/projects/common/src/service/service.ts b/projects/common/src/service/service.ts index 34634f5..1a2f24f 100644 --- a/projects/common/src/service/service.ts +++ b/projects/common/src/service/service.ts @@ -1,4 +1,5 @@ import ky from "ky"; +import { isServer } from "../utils/utils"; export default class Service { /** @@ -38,7 +39,7 @@ export default class Service { */ public async fetch(url: string): Promise { try { - return await ky.get(this.buildRequestUrl(true, url)).json(); + return await ky.get(this.buildRequestUrl(!isServer(), url)).json(); } catch (error) { return undefined; } diff --git a/projects/website/src/components/player/player-steam-profile.tsx b/projects/website/src/components/player/player-steam-profile.tsx index ad8065a..1d129e8 100644 --- a/projects/website/src/components/player/player-steam-profile.tsx +++ b/projects/website/src/components/player/player-steam-profile.tsx @@ -1,5 +1,3 @@ -"use client"; - import { FaSteam } from "react-icons/fa"; import Tooltip from "@/components/tooltip"; import ScoreSaberPlayer from "@ssr/common/player/impl/scoresaber-player";