export default defineEventHandler((event: any) => {
  // 设置基本的国际化响应头
  setHeader(event, 'X-Detected-Language', 'en');
  
  // 添加 CORS 支持
  setHeader(event, 'Access-Control-Allow-Origin', '*');
  setHeader(event, 'Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS');
  setHeader(event, 'Access-Control-Allow-Headers', 'Content-Type, Authorization');
  
  // 处理 OPTIONS 请求
  if (getMethod(event) === 'OPTIONS') {
    setResponseStatus(event, 200);
    return '';
  }
});
