File size: 275 Bytes
7e2f74d
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
const API_BASE = (import.meta.env.VITE_API_URL || '').replace(/\/$/, '');

export function apiUrl(path) {
  const normalized = path.startsWith('/') ? path : `/${path}`;
  return `${API_BASE}${normalized}`;
}

export function apiHeaders(extra = {}) {
  return { ...extra };
}