Skip to content

Commit

Permalink
🐛 Fix 304 Error
Browse files Browse the repository at this point in the history
  • Loading branch information
luoshuijs committed Mar 26, 2024
1 parent 8438e6d commit 698cb7c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions crates/openai/src/serve/proxy/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@ pub(crate) fn header_convert(
headers.insert(header::ORIGIN, header::HeaderValue::from_static(origin));
headers.insert(header::REFERER, header::HeaderValue::from_static(origin));

headers.insert(
header::COOKIE,
header::HeaderValue::from_str(
"__Secure-next-auth.callback-url=https%3A%2F%2Fchat.openai.com",
)
.map_err(ResponseError::InternalServerError)?,
);

jar.iter()
.filter(|c| {
let name = c.name().to_lowercase();
Expand Down

0 comments on commit 698cb7c

Please sign in to comment.