diff options
Diffstat (limited to 'server/helpers/proxy.ts')
-rw-r--r-- | server/helpers/proxy.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/server/helpers/proxy.ts b/server/helpers/proxy.ts new file mode 100644 index 000000000..8b82ccae0 --- /dev/null +++ b/server/helpers/proxy.ts | |||
@@ -0,0 +1,14 @@ | |||
1 | function getProxy () { | ||
2 | return process.env.HTTPS_PROXY || | ||
3 | process.env.HTTP_PROXY || | ||
4 | undefined | ||
5 | } | ||
6 | |||
7 | function isProxyEnabled () { | ||
8 | return !!getProxy() | ||
9 | } | ||
10 | |||
11 | export { | ||
12 | getProxy, | ||
13 | isProxyEnabled | ||
14 | } | ||