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:
parent
fdec51e384
commit
8729a87024
7 changed files with 191 additions and 3 deletions
14
server/helpers/proxy.ts
Normal file
14
server/helpers/proxy.ts
Normal file
|
@ -0,0 +1,14 @@
|
|||
function getProxy () {
|
||||
return process.env.HTTPS_PROXY ||
|
||||
process.env.HTTP_PROXY ||
|
||||
undefined
|
||||
}
|
||||
|
||||
function isProxyEnabled () {
|
||||
return !!getProxy()
|
||||
}
|
||||
|
||||
export {
|
||||
getProxy,
|
||||
isProxyEnabled
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue