Skip to content

Commit 9425c46

Browse files
committed
remove mandatory usage of cookies to watch tenant assets
1 parent 032df1f commit 9425c46

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

cli/src/commands/watch.rs

+7-3
Original file line numberDiff line numberDiff line change
@@ -243,12 +243,16 @@ async fn forward_api_call(
243243

244244
let url: String = format!("{}{}", environment.server, uri);
245245

246-
let raw_req = Request::builder()
246+
let mut raw_req = Request::builder()
247247
.method(Method::from_str(&method).unwrap())
248248
.uri(&url)
249249
.header(header::HOST, &host)
250-
.header("Accept", "*/*")
251-
.header(header::COOKIE, read_cookie_from_environment(true)?);
250+
.header("Accept", "*/*");
251+
252+
253+
if !uri.starts_with("/tenant-assets/") {
254+
raw_req = raw_req.header(header::COOKIE, read_cookie_from_environment(true)?);
255+
}
252256

253257
let req = if method == "GET" {
254258
raw_req.body(Empty::<Bytes>::new().boxed()).unwrap()

0 commit comments

Comments
 (0)