umami/pages/api/config.js

16 lines
454 B
JavaScript
Raw Normal View History

2022-08-29 03:20:54 +00:00
import { ok, methodNotAllowed } from 'next-basics';
export default async (req, res) => {
if (req.method === 'GET') {
return ok(res, {
basePath: process.env.BASE_PATH || '',
trackerScriptName: process.env.TRACKER_SCRIPT_NAME,
updatesDisabled: !!process.env.DISABLE_UPDATES,
telemetryDisabled: !!process.env.DISABLE_TELEMETRY,
2022-10-27 23:42:57 +00:00
adminDisabled: !!process.env.DISABLE_ADMIN,
});
}
return methodNotAllowed(res);
};