diff --git a/app/components/content/sep/entry.vue b/app/components/content/sep/entry.vue
index 5e15e341..3528e0c3 100644
--- a/app/components/content/sep/entry.vue
+++ b/app/components/content/sep/entry.vue
@@ -1,6 +1,5 @@
@@ -166,7 +175,10 @@ function handleEvent(value: string) {
Tambah
SEP
-
+
{
@@ -5,11 +6,16 @@ export default defineEventHandler(async (event) => {
const headers = getRequestHeaders(event)
const url = getRequestURL(event)
const config = useRuntimeConfig()
-
- const apiOrigin = config.public.API_ORIGIN
- const pathname = url.pathname.replace(/^\/api/, '')
- const targetUrl = apiOrigin + pathname + (url.search || '')
+ const apiOrigin = config.public.API_ORIGIN
+ const apiVclaim = config.public.VCLAIM
+ const pathname = url.pathname.replace(/^\/api/, '')
+ const isVclaim = pathname.includes('/vclaim')
+
+ let targetUrl = apiOrigin + pathname + (url.search || '')
+ if (pathname.includes('/vclaim')) {
+ targetUrl = apiVclaim + pathname.replace('/vclaim', '') + (url.search || '')
+ }
const verificationId = headers['verification-id'] as string | undefined
let bearer = ''
@@ -22,7 +28,7 @@ export default defineEventHandler(async (event) => {
const forwardHeaders = new Headers()
if (headers['content-type']) forwardHeaders.set('Content-Type', headers['content-type'])
- forwardHeaders.set('Authorization', `Bearer ${bearer}`)
+ if (!isVclaim) forwardHeaders.set('Authorization', `Bearer ${bearer}`)
let body: any
if (['POST', 'PATCH'].includes(method!)) {
@@ -41,5 +47,9 @@ export default defineEventHandler(async (event) => {
body,
})
+ if (isVclaim) {
+ console.log('res:', res)
+ }
+
return res
})