feat : accesskey

This commit is contained in:
cxymds
2024-12-10 17:23:18 +08:00
parent 1d6f4ea715
commit df58e55bbb
10 changed files with 679 additions and 12 deletions
+5 -5
View File
@@ -1,11 +1,11 @@
import { joinURL } from "ufo";
import { joinURL } from 'ufo'
export default defineEventHandler(async (event) => {
const proxyUrl = useRuntimeConfig().public.api.baseURL;
const proxyUrl = useRuntimeConfig().public.api.baseURL
const target = joinURL(proxyUrl, event.path.replace('/api', ''));
const target = joinURL(proxyUrl, event.path.replace('/api', '/api/v1'))
console.log('Proxying request to:', target);
console.log('Proxying request to:', target)
return proxyRequest(event, target);
return proxyRequest(event, target)
})