Refactor API URL configuration

This commit is contained in:
Jesse Wierzbinski 2024-04-09 01:48:13 -10:00
parent d9198cfddf
commit 577b866bb3
No known key found for this signature in database
3 changed files with 18 additions and 13 deletions

View file

@ -13,6 +13,9 @@ export default defineEventHandler(async () => {
bind: config?.http.bind,
bind_port: config?.http.bind_port,
base_url: config?.http.base_url,
url: config?.http.bind.includes("http")
? `${config?.http.bind}:${config?.http.bind_port}`
: `http://${config?.http.bind}:${config?.http.bind_port}`,
},
};
});