mirror of
https://github.com/rustfs/console.git
synced 2026-09-19 09:52:25 +08:00
12 lines
322 B
TypeScript
12 lines
322 B
TypeScript
import { joinURL } from 'ufo';
|
|
|
|
export default defineEventHandler(async (event) => {
|
|
const proxyUrl = useRuntimeConfig().public.api.baseURL;
|
|
|
|
const target = joinURL(proxyUrl, event.path.replace('/rustfs', '/rustfs/admin/v3'));
|
|
|
|
console.log('Proxying request to:', target);
|
|
|
|
return proxyRequest(event, target);
|
|
});
|