Always use remote url for discord rpc image (#2009)

* add option to force remote url for api calls

* force remote url for discord rpc image
This commit is contained in:
Felix Prillwitz
2026-05-08 06:13:34 +02:00
committed by GitHub
parent cc8910cfd6
commit 5d4547080d
5 changed files with 14 additions and 7 deletions
+3 -2
View File
@@ -479,11 +479,12 @@ axiosClient.interceptors.response.use(
);
export const ndApiClient = (args: {
forceRemoteUrl?: boolean;
server: null | ServerListItemWithCredential;
signal?: AbortSignal;
url?: string;
}) => {
const { server, signal, url } = args;
const { forceRemoteUrl, server, signal, url } = args;
return initClient(contract, {
api: async ({ body, headers, method, path }) => {
@@ -493,7 +494,7 @@ export const ndApiClient = (args: {
const { params, path: api } = parsePath(path);
if (server) {
const serverUrl = getServerUrl(server);
const serverUrl = getServerUrl(server, forceRemoteUrl);
baseUrl = serverUrl ? `${serverUrl}/api` : undefined;
token = server?.ndCredential;
} else {