mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 15:47:13 +01:00
Added endpoint for fetching server-side variables.
This commit is contained in:
parent
68d35c0fc4
commit
50e491af06
8 changed files with 62 additions and 15 deletions
14
pages/api/config.js
Normal file
14
pages/api/config.js
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import { ok, methodNotAllowed } from 'lib/response';
|
||||
|
||||
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,
|
||||
});
|
||||
}
|
||||
|
||||
return methodNotAllowed(res);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue