1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 02:39:33 +02:00

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>
This commit is contained in:
smilekison 2021-08-25 06:08:37 -07:00 committed by GitHub
parent fdec51e384
commit 8729a87024
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 191 additions and 3 deletions

14
server/helpers/proxy.ts Normal file
View file

@ -0,0 +1,14 @@
function getProxy () {
return process.env.HTTPS_PROXY ||
process.env.HTTP_PROXY ||
undefined
}
function isProxyEnabled () {
return !!getProxy()
}
export {
getProxy,
isProxyEnabled
}