Gunnar

nordisk/monetize

crates/monetize-ui-web/Trunk.toml

[build]
target = "index.html"
dist = "dist"

# Pinned so a bundle built on a laptop and one built in CI are the same bundle.
# `wasm_bindgen` must match the `wasm-bindgen` crate version in Cargo.lock exactly.
[tools]
wasm_bindgen = "0.2.128"
wasm_opt = "version_123"

[serve]
addresses = ["127.0.0.1"]
port = 8092

# Mirrors the policy monetize-ui-server serves, so dev and prod fail identically.
# 'unsafe-inline' in style-src is permanent: it governs the `style=` attributes
# Leptos writes, which no nonce or hash can cover.
csp = [
  "default-src 'none'",
  "script-src 'self' 'wasm-unsafe-eval' 'nonce-{{NONCE}}'",
  "style-src 'self' 'unsafe-inline'",
  "connect-src 'self'",
  "img-src 'self' data:",
  "font-src 'self'",
  "form-action 'none'",
  "frame-ancestors 'none'",
]

# The BFF owns these paths (`monetize-ui-server --bind 127.0.0.1:8091`).
[[proxy]]
rewrite = "/api"
backend = "http://127.0.0.1:8091/api"

[[proxy]]
rewrite = "/auth"
backend = "http://127.0.0.1:8091/auth"