🐛 Fix proxy
This commit is contained in:
parent
a51793bc4f
commit
e0341318ac
@ -1,11 +1,10 @@
|
||||
export default defineEventHandler(async (event) => {
|
||||
if (process.env.NODE_ENV === 'development')
|
||||
{
|
||||
const user = process.env.NUXT_PRIVATE_SUPERUSER_USER;
|
||||
const password = process.env.NUXT_PRIVATE_SUPERUSER_PASSWORD;
|
||||
if (user == null || password == null)
|
||||
{
|
||||
throw new Error();
|
||||
console.error("Username or password is null.");
|
||||
throw Error();
|
||||
}
|
||||
return proxyRequest(event, process.env.NUXT_PUBLIC_BASE_URL + event.path, {
|
||||
fetchOptions: {
|
||||
@ -14,5 +13,4 @@ export default defineEventHandler(async (event) => {
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
Loading…
x
Reference in New Issue
Block a user