mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-08-24 12:24:01 +02:00
crates-server/yaak-send-proxy: a stateless executor over yaak-http's HttpTransaction. It takes a rendered request, streams timeline events, the response head, body chunks and the resulting cookies back as NDJSON, and keeps nothing. Private/loopback/link-local/metadata ranges are refused after DNS on every hop (an AddressFilter on the resolver plus a per-hop URL check), with size caps, a timeout ceiling, a rate limit, host allow/deny lists and an optional token. The web host now sends through it: the wasm worker resolves and renders the request (render_http_request moved into yaak-models so it builds for wasm; re-exported from its old paths), the tab posts it, and stores what comes back where the desktop stores it. Requests needing auth plugins or template functions are refused with the reason until plugins run in the browser.
30 lines
867 B
TOML
30 lines
867 B
TOML
[package]
|
|
name = "yaak-templates"
|
|
version = "0.1.0"
|
|
edition = "2024"
|
|
publish = false
|
|
|
|
[package.metadata.wasm-pack.profile.release]
|
|
wasm-opt = false # Causes errors in CI (haven't figured out why yet)
|
|
|
|
[lib]
|
|
crate-type = ["cdylib", "rlib"]
|
|
|
|
[features]
|
|
default = ["wasm"]
|
|
# The `#[wasm_bindgen]` exports (parse_template etc.) that make up the
|
|
# @yaakapp-internal/templates package. Off for crates that link this one into
|
|
# their own wasm module and do not want these re-exported from theirs.
|
|
wasm = []
|
|
|
|
[dependencies]
|
|
base64 = "0.22.1"
|
|
serde = { workspace = true, features = ["derive"] }
|
|
serde_json = { workspace = true }
|
|
thiserror = { workspace = true }
|
|
tokio = { workspace = true, features = ["macros", "rt"] }
|
|
ts-rs = { workspace = true }
|
|
wasm-bindgen = { version = "0.2.100", features = ["serde-serialize"] }
|
|
serde-wasm-bindgen = "0.6.5"
|
|
log = { workspace = true }
|