mirror of
https://github.com/telemt/telemt.git
synced 2026-10-30 12:30:34 +03:00
Configurable HTTP Methods for Bridge Carriers
Co-Authored-By: brekotis <93345790+brekotis@users.noreply.github.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
use base64::Engine as _;
|
||||
|
||||
use crate::config::WebCarrierMethod;
|
||||
use crate::crypto::SecureRandom;
|
||||
|
||||
/// Browser security policy for the transient Telegram Desktop bridge page.
|
||||
@@ -34,6 +35,7 @@ pub(crate) fn render(
|
||||
reconnect_grace_secs: u64,
|
||||
carrier_probe_coalesce_ms: u64,
|
||||
bridge_diagnostics_enabled: bool,
|
||||
carrier_method: WebCarrierMethod,
|
||||
rng: &SecureRandom,
|
||||
) -> BridgePage {
|
||||
let mut nonce = [0u8; 18];
|
||||
@@ -124,6 +126,7 @@ pub(crate) fn render(
|
||||
.replace("__HOST__", host)
|
||||
.replace("__BASE_PREFIX__", base_prefix)
|
||||
.replace("__BOOTSTRAP__", bootstrap)
|
||||
.replace("__CARRIER_METHOD__", carrier_method.as_str())
|
||||
.replace("__BATCH_LIMIT__", &batch_limit.to_string())
|
||||
.replace("__QUEUE_LIMIT__", &queue_limit.to_string())
|
||||
.replace("__QUEUE_ITEMS__", &queue_items.to_string())
|
||||
|
||||
Reference in New Issue
Block a user