2026-03-22 09:09:04 +01:00

13 lines
475 B
TypeScript

export default defineEventHandler(async (event) => {
if (process.env.NODE_ENV === 'development')
{
setHeader(event, "Authorization", "Basic " + Buffer.from("admin:pw").toString('base64'))
return proxyRequest(event, 'http://localhost:8089' + event.path, {
fetchOptions: {
headers: {
Authorization: "Basic " + Buffer.from("admin:pw").toString('base64')
}
}
});
}
})