feat: ipv4 and ipv6

This commit is contained in:
Andras Bacsai
2022-07-22 20:48:04 +00:00
parent bb2864a83f
commit 9e3ba295ea
7 changed files with 35 additions and 5 deletions

View File

@@ -1,10 +1,13 @@
import { FastifyPluginAsync } from 'fastify';
import { errorHandler, version } from '../../../../lib/common';
import { errorHandler, listSettings, version } from '../../../../lib/common';
const root: FastifyPluginAsync = async (fastify): Promise<void> => {
fastify.get('/', async () => {
const settings = await listSettings()
try {
return {
ipv4: settings.ipv4,
ipv6: settings.ipv6,
version,
whiteLabeled: process.env.COOLIFY_WHITE_LABELED === 'true',
whiteLabeledIcon: process.env.COOLIFY_WHITE_LABELED_ICON,