don't proxy requests that happen on the server
This commit is contained in:
parent
a6576e9730
commit
238ec6e254
BIN
bun.lockb
BIN
bun.lockb
Binary file not shown.
@ -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<T>(url: string): Promise<T | undefined> {
|
||||
try {
|
||||
return await ky.get<T>(this.buildRequestUrl(true, url)).json();
|
||||
return await ky.get<T>(this.buildRequestUrl(!isServer(), url)).json();
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
|
@ -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";
|
||||
|
Reference in New Issue
Block a user