fix: update MCPRouter referer URL to new domain (#293)

This commit is contained in:
samanhappy
2025-08-25 13:25:37 +08:00
committed by GitHub
parent 83cbd16821
commit 69a800fa7a
6 changed files with 11 additions and 11 deletions

View File

@@ -79,7 +79,7 @@ export const useSettingsData = () => {
const [mcpRouterConfig, setMCPRouterConfig] = useState<MCPRouterConfig>({
apiKey: '',
referer: 'https://mcphub.app',
referer: 'https://www.mcphubx.com',
title: 'MCPHub',
baseUrl: 'https://api.mcprouter.to/v1',
});
@@ -130,7 +130,7 @@ export const useSettingsData = () => {
if (data.success && data.data?.systemConfig?.mcpRouter) {
setMCPRouterConfig({
apiKey: data.data.systemConfig.mcpRouter.apiKey || '',
referer: data.data.systemConfig.mcpRouter.referer || 'https://mcphub.app',
referer: data.data.systemConfig.mcpRouter.referer || 'https://www.mcphubx.com',
title: data.data.systemConfig.mcpRouter.title || 'MCPHub',
baseUrl: data.data.systemConfig.mcpRouter.baseUrl || 'https://api.mcprouter.to/v1',
});

View File

@@ -43,7 +43,7 @@ const SettingsPage: React.FC = () => {
baseUrl: string;
}>({
apiKey: '',
referer: 'https://mcphub.app',
referer: 'https://www.mcphubx.com',
title: 'MCPHub',
baseUrl: 'https://api.mcprouter.to/v1',
});
@@ -88,7 +88,7 @@ const SettingsPage: React.FC = () => {
if (mcpRouterConfig) {
setTempMCPRouterConfig({
apiKey: mcpRouterConfig.apiKey || '',
referer: mcpRouterConfig.referer || 'https://mcphub.app',
referer: mcpRouterConfig.referer || 'https://www.mcphubx.com',
title: mcpRouterConfig.title || 'MCPHub',
baseUrl: mcpRouterConfig.baseUrl || 'https://api.mcprouter.to/v1',
});

View File

@@ -474,7 +474,7 @@
"mcpRouterApiKeyPlaceholder": "Enter MCPRouter API key",
"mcpRouterReferer": "Referer",
"mcpRouterRefererDescription": "Referer header for MCPRouter API requests",
"mcpRouterRefererPlaceholder": "https://mcphub.app",
"mcpRouterRefererPlaceholder": "https://www.mcphubx.com",
"mcpRouterTitle": "Title",
"mcpRouterTitleDescription": "Title header for MCPRouter API requests",
"mcpRouterTitlePlaceholder": "MCPHub",

View File

@@ -476,7 +476,7 @@
"mcpRouterApiKeyPlaceholder": "请输入 MCPRouter API 密钥",
"mcpRouterReferer": "引用地址",
"mcpRouterRefererDescription": "MCPRouter API 请求的引用地址头",
"mcpRouterRefererPlaceholder": "https://mcphub.app",
"mcpRouterRefererPlaceholder": "https://www.mcphubx.com",
"mcpRouterTitle": "标题",
"mcpRouterTitleDescription": "MCPRouter API 请求的标题头",
"mcpRouterTitlePlaceholder": "MCPHub",

View File

@@ -562,7 +562,7 @@ export const updateSystemConfig = (req: Request, res: Response): void => {
},
mcpRouter: {
apiKey: '',
referer: 'https://mcphub.app',
referer: 'https://www.mcphubx.com',
title: 'MCPHub',
baseUrl: 'https://api.mcprouter.to/v1',
},
@@ -600,7 +600,7 @@ export const updateSystemConfig = (req: Request, res: Response): void => {
if (!settings.systemConfig.mcpRouter) {
settings.systemConfig.mcpRouter = {
apiKey: '',
referer: 'https://mcphub.app',
referer: 'https://www.mcphubx.com',
title: 'MCPHub',
baseUrl: 'https://api.mcprouter.to/v1',
};
@@ -866,4 +866,4 @@ export const updatePromptDescription = async (req: Request, res: Response): Prom
message: 'Internal server error',
});
}
};
};

View File

@@ -19,7 +19,7 @@ const getMCPRouterConfig = () => {
return {
apiKey: mcpRouterConfig?.apiKey || process.env.MCPROUTER_API_KEY || '',
referer: mcpRouterConfig?.referer || process.env.MCPROUTER_REFERER || 'https://mcphub.app',
referer: mcpRouterConfig?.referer || process.env.MCPROUTER_REFERER || 'https://www.mcphubx.com',
title: mcpRouterConfig?.title || process.env.MCPROUTER_TITLE || 'MCPHub',
baseUrl:
mcpRouterConfig?.baseUrl || process.env.MCPROUTER_API_BASE || DEFAULT_MCPROUTER_API_BASE,
@@ -33,7 +33,7 @@ const getAxiosConfig = (): AxiosRequestConfig => {
return {
headers: {
Authorization: mcpRouterConfig.apiKey ? `Bearer ${mcpRouterConfig.apiKey}` : '',
'HTTP-Referer': mcpRouterConfig.referer || 'https://mcphub.app',
'HTTP-Referer': mcpRouterConfig.referer || 'https://www.mcphubx.com',
'X-Title': mcpRouterConfig.title || 'MCPHub',
'Content-Type': 'application/json',
},