feat: remove unused VClaim configuration and clean up validation logic in integration schema

This commit is contained in:
riefive
2025-12-02 13:11:49 +07:00
parent a058fd6659
commit 32a6c27375
4 changed files with 3 additions and 436 deletions
-4
View File
@@ -7,15 +7,11 @@ export default defineEventHandler(async (event) => {
const config = useRuntimeConfig()
const apiOrigin = config.public.API_ORIGIN
const apiVclaim = config.public.VCLAIM
const apiVclaimSwagger = config.public.VCLAIM_SWAGGER
const pathname = url.pathname.replace(/^\/api/, '')
const isVclaim = pathname.includes('/vclaim') && !pathname.includes('/vclaim-sep')
let targetUrl = apiOrigin + pathname + (url.search || '')
if (pathname.includes('/vclaim') && !pathname.includes('/vclaim-sep')) {
targetUrl = apiVclaim + pathname.replace('/vclaim', '') + (url.search || '')
}
if (pathname.includes('/vclaim-swagger')) {
targetUrl = apiVclaimSwagger + pathname.replace('/vclaim-swagger', '') + (url.search || '')
}