mirror of
https://github.com/linshenkx/prompt-optimizer.git
synced 2026-06-02 12:39:49 +08:00
- 在核心服务中添加 Vercel 环境检测和代理工具函数 - 更新 LLM 服务,支持通过 Vercel 代理解决跨域问题 - 扩展模型配置类型,新增 `useVercelProxy` 选项 - 在 ModelManager 组件中添加 Vercel 代理可用性检测和配置 - 更新技术开发指南,详细说明跨域代理解决方案 - 调整 Vercel 配置,支持 API 代理和环境变量设置
23 lines
514 B
JavaScript
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'
|
|
}
|
|
}
|
|
);
|
|
}
|