diff --git a/.env.local-example b/.env.local-example index ad8e128..6a11708 100644 --- a/.env.local-example +++ b/.env.local-example @@ -1,10 +1,10 @@ -NEXT_PUBLIC_HTTP_PROXY=https://proxy.fascinated.cc +HTTP_PROXY=https://proxy.fascinated.cc -NEXT_PUBLIC_SITE_NAME=BeatSaber Overlay -NEXT_PUBLIC_SITE_TITLE=BeatSaber Overlay - Simple and easy to use BeatSaber overlay -NEXT_PUBLIC_SITE_DESCRIPTION=Free, simple, and easy to use beat saber overlay for OBS -NEXT_PUBLIC_SITE_COLOR=#0EBFE9 -NEXT_PUBLIC_SITE_URL=https://bs-overlay.fascinated.cc +SITE_NAME=BeatSaber Overlay +SITE_TITLE=BeatSaber Overlay - Simple and easy to use BeatSaber overlay +SITE_DESCRIPTION=Free, simple, and easy to use beat saber overlay for OBS +SITE_COLOR=#0EBFE9 +SITE_URL=https://bs-overlay.fascinated.cc REDIS_PORT=6379 REDIS_HOST=127.0.0.1 diff --git a/next.config.js b/next.config.js index 04b0f20..750f41f 100644 --- a/next.config.js +++ b/next.config.js @@ -8,6 +8,14 @@ const nextConfig = { images: { domains: ["cdn.scoresaber.com", "*.cdn.beatsaver.com", "cdn.fascinated.cc"], }, + publicRuntimeConfig: { + httpProxy: process.env.HTTP_PROXY, + siteName: process.env.SITE_NAME, + siteTitle: process.env.SITE_TITLE, + siteDescription: process.env.SITE_DESCRIPTION, + siteColor: process.env.SITE_COLOR, + siteUrl: process.env.SITE_URL, + }, }; module.exports = nextConfig; diff --git a/src/consts/LeaderboardType.js b/src/consts/LeaderboardType.js index 3967fe4..f4ad8ac 100644 --- a/src/consts/LeaderboardType.js +++ b/src/consts/LeaderboardType.js @@ -1,9 +1,11 @@ +import getConfig from "next/config"; +const { publicRuntimeConfig: config } = getConfig(); + const WebsiteTypes = { ScoreSaber: { ApiUrl: { PlayerData: - process.env.NEXT_PUBLIC_HTTP_PROXY + - "/https://scoresaber.com/api/player/%s/basic", + config.httpProxy + "/https://scoresaber.com/api/player/%s/basic", MapData: "https://scoresaber.com/api/leaderboard/by-hash/%h/info?difficulty=%d", },