feat: update API paths to v1 and remove old path references for consistency
This commit is contained in:
@@ -10,10 +10,10 @@ export default defineEventHandler(async (event) => {
|
||||
const apiVclaim = config.public.VCLAIM
|
||||
const apiVclaimSwagger = config.public.VCLAIM_SWAGGER
|
||||
const pathname = url.pathname.replace(/^\/api/, '')
|
||||
const isVclaim = pathname.includes('/vclaim')
|
||||
const isVclaim = pathname.includes('/vclaim') && !pathname.includes('/vclaim-sep')
|
||||
|
||||
let targetUrl = apiOrigin + pathname + (url.search || '')
|
||||
if (pathname.includes('/vclaim')) {
|
||||
if (pathname.includes('/vclaim') && !pathname.includes('/vclaim-sep')) {
|
||||
targetUrl = apiVclaim + pathname.replace('/vclaim', '') + (url.search || '')
|
||||
}
|
||||
if (pathname.includes('/vclaim-swagger')) {
|
||||
|
||||
Reference in New Issue
Block a user