feat(sep): add service of letter vclaim
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { is } from 'date-fns/locale'
|
||||
import { defineEventHandler, getCookie, getRequestHeaders, getRequestURL, readBody } from 'h3'
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
@@ -9,6 +8,7 @@ export default defineEventHandler(async (event) => {
|
||||
|
||||
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')
|
||||
|
||||
@@ -16,6 +16,9 @@ export default defineEventHandler(async (event) => {
|
||||
if (pathname.includes('/vclaim')) {
|
||||
targetUrl = apiVclaim + pathname.replace('/vclaim', '') + (url.search || '')
|
||||
}
|
||||
if (pathname.includes('/vclaim-swagger')) {
|
||||
targetUrl = apiVclaimSwagger + pathname.replace('/vclaim-swagger', '') + (url.search || '')
|
||||
}
|
||||
|
||||
const verificationId = headers['verification-id'] as string | undefined
|
||||
let bearer = ''
|
||||
|
||||
Reference in New Issue
Block a user