feat(material): retest material
This commit is contained in:
@@ -1,15 +1,13 @@
|
||||
import process from 'node:process'
|
||||
import { defineEventHandler, getCookie, getRequestHeaders, getRequestURL, readBody } from 'h3'
|
||||
|
||||
const API_ORIGIN = process.env.API_ORIGIN as string
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
const { method } = event.node.req
|
||||
const headers = getRequestHeaders(event)
|
||||
const url = getRequestURL(event)
|
||||
const config = useRuntimeConfig()
|
||||
|
||||
const apiOrigin = config.API_ORIGIN || API_ORIGIN
|
||||
const apiOrigin = config.API_ORIGIN
|
||||
const pathname = url.pathname.replace(/^\/api/, '')
|
||||
|
||||
const targetUrl = apiOrigin + pathname + (url.search || '')
|
||||
|
||||
Reference in New Issue
Block a user