PeerTube/server/helpers/proxy.ts
smilekison 8729a87024
Support proxies for PeerTube (#4346)
* Updated with latest code

* Updated Support proxies for PeerTube

* Support Proxies for PeerTube (Updated with change request)

* Cleanup proxy PR

Co-authored-by: Chocobozzz <me@florianbigard.com>
2021-08-25 15:08:37 +02:00

15 lines
210 B
TypeScript

function getProxy () {
return process.env.HTTPS_PROXY ||
process.env.HTTP_PROXY ||
undefined
}
function isProxyEnabled () {
return !!getProxy()
}
export {
getProxy,
isProxyEnabled
}