Compare commits
No commits in common. '1ed359f602f9cb407a9b74fa9296dc255ff3633c' and 'dc3a682a77b8f5c9c95823835476e1bb07f95506' have entirely different histories.
1ed359f602
...
dc3a682a77
@ -1,28 +0,0 @@
|
||||
export interface Config {
|
||||
port: number;
|
||||
apiBasePath: string;
|
||||
disableDefaultApiEndpoint: boolean;
|
||||
trustProxy: string | boolean;
|
||||
}
|
||||
|
||||
export default function appConfig(): Config {
|
||||
const {
|
||||
PORT,
|
||||
BASE_PATH,
|
||||
TRUST_PROXY,
|
||||
DISABLE_DEFAULT_API_ENDPOINT,
|
||||
} = process.env;
|
||||
|
||||
let trustProxy: string | boolean = false;
|
||||
|
||||
if (TRUST_PROXY == '*') {
|
||||
trustProxy = true;
|
||||
}
|
||||
|
||||
return {
|
||||
port: Number(PORT ?? 3000),
|
||||
apiBasePath: BASE_PATH ?? '',
|
||||
trustProxy,
|
||||
disableDefaultApiEndpoint: DISABLE_DEFAULT_API_ENDPOINT == 'true',
|
||||
};
|
||||
}
|
Loading…
Reference in new issue