aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/proxy.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers/proxy.ts')
-rw-r--r--server/helpers/proxy.ts14
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 @@
1function getProxy () {
2 return process.env.HTTPS_PROXY ||
3 process.env.HTTP_PROXY ||
4 undefined
5}
6
7function isProxyEnabled () {
8 return !!getProxy()
9}
10
11export {
12 getProxy,
13 isProxyEnabled
14}