mirror of
https://github.com/rustfs/console.git
synced 2026-08-30 17:14:47 +08:00
c019276fcb
Signed-off-by: junxiang Mu <1948535941@qq.com>
12 lines
320 B
TypeScript
12 lines
320 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);
|
|
});
|