From 23f4ef1070498dfe72dc6a8f9f85d52c4683076f Mon Sep 17 00:00:00 2001 From: murdle Date: Sat, 27 Dec 2025 22:19:26 +0200 Subject: [PATCH] add baseurl on serverside --- assets/public/index.html | 803 ++++++++++-------- assets/public/landing.html | 26 +- .../3c6ccb83716d1e4fb91d3082f6b21d77.png.png | Bin 0 -> 26684 bytes .../c09a43a372ba81e3018c3151d4ed4773.png.png | Bin 0 -> 22275 bytes src/api/Server.ts | 16 +- src/util/dtos/ReadyGuildDTO.ts | 1 - 6 files changed, 467 insertions(+), 379 deletions(-) create mode 100644 assets/public/thirdparty/3c6ccb83716d1e4fb91d3082f6b21d77.png.png create mode 100644 assets/public/thirdparty/c09a43a372ba81e3018c3151d4ed4773.png.png diff --git a/assets/public/index.html b/assets/public/index.html index 130b41ab..20265756 100644 --- a/assets/public/index.html +++ b/assets/public/index.html @@ -1,390 +1,477 @@ + - - - - - - - - - - + + + + + + + + + + - - - - Discord + + + + Discord - - - - - + + + + + - - - - + + + + - + - async function loadGlobalEnv() { - try { - const res = await fetch("/.well-known/spacebar/client"); - const data = await res.json(); + +
- window.GLOBAL_ENV = { - API_ENDPOINT: protocolRelative(data.api.baseUrl) + "/api", - API_VERSION: 9, - WEBAPP_ENDPOINT: protocolRelative(data.api.baseUrl), - CDN_HOST: protocolRelative(data.cdn.baseUrl), - ASSET_ENDPOINT: protocolRelative(data.cdn.baseUrl), - MEDIA_PROXY_ENDPOINT: protocolRelative(data.cdn.baseUrl), - WIDGET_ENDPOINT: "//discord.com/widget", - INVITE_HOST: "discord.gg", - GUILD_TEMPLATE_HOST: "discord.new", - GIFT_CODE_HOST: "discord.gift", - RELEASE_CHANNEL: "stable", - MARKETING_ENDPOINT: protocolRelative(data.api.baseUrl), - BRAINTREE_KEY: "production_5st77rrc_49pp2rp4phym7387", - STRIPE_KEY: "pk_live_CUQtlpQUF0vufWpnpUmQvcdi", - NETWORKING_ENDPOINT: protocolRelative(data.api.baseUrl), - RTC_LATENCY_ENDPOINT: protocolRelative(data.api.baseUrl), - ACTIVITY_APPLICATION_HOST: protocolRelative(data.api.baseUrl), - PROJECT_ENV: "production", - REMOTE_AUTH_ENDPOINT: "//remote-auth-gateway.discord.gg", - SENTRY_TAGS: { buildId: "9af39da", buildType: "normal" }, - MIGRATION_SOURCE_ORIGIN: protocolRelative(data.api.baseUrl), - MIGRATION_DESTINATION_ORIGIN: protocolRelative(data.api.baseUrl), - HTML_TIMESTAMP: Date.now(), - ALGOLIA_KEY: "aca0d7082e4e63af5ba5917d5e96bed0", - GATEWAY_ENDPOINT: data.gateway.baseUrl, - VAPID_KEY: data.vapid.publicKey, - GATEWAY_URL: data.gateway.baseUrl - }; + + + + + - const customScripts = [ - "/assets/custom/utils.js", - "/assets/custom/pushMessages.js", - "/assets/custom/rtcPatcher.js", - "/assets/custom/web/switch.js", - "/assets/custom/web/main.js", - ] + + + + + + - const normalScripts = [ - "/assets/053574d0f6edc579c71e.js", - "/assets/771dcd97bfd5f9b77ef6.js", - "/assets/0ffb9e3c90aa88720fc7.js", - "/assets/cbc98c97c3635bf34da3.js", - ]; + + - - \ No newline at end of file diff --git a/assets/public/landing.html b/assets/public/landing.html index aa7f775c..6424a022 100644 --- a/assets/public/landing.html +++ b/assets/public/landing.html @@ -42,7 +42,7 @@