File size: 285 Bytes
d003a1c
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
import type { H3Event } from "h3";

export default defineEventHandler(async (event: H3Event) => {
  const config = useRuntimeConfig();
  const targetPath = event.path.replace(/^\/api/, "");
  const target = `${config.apiBaseUrl}${targetPath}`;
  return proxyRequest(event, target);
});