diff --git a/crates-server/yaak-send-proxy/src/send.rs b/crates-server/yaak-send-proxy/src/send.rs index a8c2c980..882a6270 100644 --- a/crates-server/yaak-send-proxy/src/send.rs +++ b/crates-server/yaak-send-proxy/src/send.rs @@ -202,6 +202,12 @@ impl PreparedSend { let _ = cancel_tx.send(true); }); + // The first line of what the proxy adds to the timeline says what did the sending, + // so a response's timeline is honest about the hop between the tab and the server. + let _ = event_tx.try_send(HttpResponseEvent::Info(format!( + "Executed by yaak-send-proxy {}", + env!("CARGO_PKG_VERSION") + ))); if self.timeout_capped { let _ = event_tx.try_send(HttpResponseEvent::Info(format!( "Timeout set to {:?} (this proxy's ceiling)", diff --git a/packages/platform/src/web/send.ts b/packages/platform/src/web/send.ts index 9ca8d609..66195c41 100644 --- a/packages/platform/src/web/send.ts +++ b/packages/platform/src/web/send.ts @@ -33,7 +33,7 @@ import type { } from "@yaakapp-internal/models"; import type { Frame, SendRequest } from "@yaakapp-internal/send-proxy"; import type { WorkerConnection } from "./connection"; -import { proxySendUrl, readFrames } from "./proxy"; +import { proxyBaseUrl, proxySendUrl, readFrames } from "./proxy"; /* -------------------------------- shapes --------------------------------- */ @@ -105,6 +105,10 @@ async function runSend( const timeline = new TimelineWriter(db, response.id, response.workspaceId); timeline.push(prepared.settingEvents); + // Where the bytes actually left from. A request through a proxy shows a + // different origin to the server than the user's machine, and the timeline + // is where that should be visible. + timeline.push([{ type: "setting", name: "proxy", value: proxyBaseUrl() }]); const body: SendRequest = { request: prepared.request,