13 lines
475 B
TypeScript
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')
|
|
}
|
|
}
|
|
});
|
|
}
|
|
}) |