fix: normalize OUTBOUND_PROXY_URL to ensure https protocol
Browse files- outbound-fix.js +4 -1
outbound-fix.js
CHANGED
|
@@ -11,7 +11,10 @@
|
|
| 11 |
const https = require("https");
|
| 12 |
const http = require("http");
|
| 13 |
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
| 15 |
const BLOCKED_DOMAINS = ["api.telegram.org", "discord.com", "gateway.discord.gg"];
|
| 16 |
|
| 17 |
if (PROXY_URL) {
|
|
|
|
| 11 |
const https = require("https");
|
| 12 |
const http = require("http");
|
| 13 |
|
| 14 |
+
let PROXY_URL = process.env.OUTBOUND_PROXY_URL;
|
| 15 |
+
if (PROXY_URL && !PROXY_URL.startsWith("http://") && !PROXY_URL.startsWith("https://")) {
|
| 16 |
+
PROXY_URL = `https://${PROXY_URL}`;
|
| 17 |
+
}
|
| 18 |
const BLOCKED_DOMAINS = ["api.telegram.org", "discord.com", "gateway.discord.gg"];
|
| 19 |
|
| 20 |
if (PROXY_URL) {
|