Skip to content
This repository was archived by the owner on Apr 12, 2025. It is now read-only.

Commit c08809d

Browse files
committed
fix: add some more headers
1 parent e216bd8 commit c08809d

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

Diff for: src/models.rs

+2
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,8 @@ pub struct PlexContext {
161161
pub container_size: Option<i32>,
162162
#[salvo(extract(rename = "X-Plex-Container-Start"))]
163163
pub container_start: Option<i32>,
164+
#[salvo(extract(rename = "x-plex-http-pipeline"))]
165+
pub http_pipeline: Option<String>,
164166
#[serde(default = "default_as_false", deserialize_with = "bool_from_int")]
165167
#[salvo(extract(rename = "includeCollections"))]
166168
pub include_collections: bool,

Diff for: src/plex_client.rs

+9
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,8 @@ impl PlexClient {
377377
);
378378
}
379379

380+
// let mut params = params.clone();
381+
// params.forwarded_for = Some("182.32.122.20".to_string());
380382
if let Some(i) = params.clone().forwarded_for.clone() {
381383
headers.insert(
382384
FORWARDED,
@@ -506,6 +508,13 @@ impl PlexClient {
506508
);
507509
}
508510

511+
if let Some(i) = params.clone().http_pipeline.clone() {
512+
headers.insert(
513+
"x-plex-http-pipeline",
514+
header::HeaderValue::from_str(i.as_str()).unwrap(),
515+
);
516+
}
517+
509518
if let Some(i) = params.clone().provider_version.clone() {
510519
headers.insert(
511520
"X-Plex-Provider-Version",

0 commit comments

Comments
 (0)