import axios from 'axios'

export const legacyClient = axios.create({
  baseURL: import.meta.env.SSR
    ? ((await import('astro:env/server')) as any)['LEGACY_BACKEND_URL_SSR']
    : 'https://legacy.passthem.top/api',
  // baseURL: 'https://legacy.passthem.top/api',
  timeout: 6000,
  withCredentials: true,
  headers: {
    'Content-Type': 'application/json',
  },
})
