Files
prompt-optimizer/api/vercel-status.js
linshen bf9d98eb69 新增 Vercel 跨域代理支持和环境检测功能
- 在核心服务中添加 Vercel 环境检测和代理工具函数
- 更新 LLM 服务,支持通过 Vercel 代理解决跨域问题
- 扩展模型配置类型,新增 `useVercelProxy` 选项
- 在 ModelManager 组件中添加 Vercel 代理可用性检测和配置
- 更新技术开发指南,详细说明跨域代理解决方案
- 调整 Vercel 配置,支持 API 代理和环境变量设置
2025-03-03 00:25:02 +08:00

23 lines
514 B
JavaScript

export const config = {
runtime: 'edge'
};
export default async function handler(request) {
return new Response(
JSON.stringify({
status: 'available',
environment: 'vercel',
proxySupport: true,
version: '1.0.0'
}),
{
status: 200,
headers: {
'Content-Type': 'application/json',
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Methods': 'GET, OPTIONS',
'Access-Control-Allow-Headers': 'Content-Type'
}
}
);
}