2023-10-21 16:26:13 +00:00
|
|
|
export const env = {
|
|
|
|
allowRegister: checkEnvTrusty(process.env.ALLOW_REGISTER),
|
|
|
|
allowOpenapi: checkEnvTrusty(process.env.ALLOW_OPENAPI),
|
|
|
|
websiteId: process.env.WEBSITE_ID,
|
2023-11-08 14:58:45 +00:00
|
|
|
serverUrl: process.env.SERVER_URL, // example: https://tianji.example.com
|
2023-10-21 16:26:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export function checkEnvTrusty(env: string | undefined): boolean {
|
|
|
|
return env === '1' || env === 'true';
|
|
|
|
}
|