Expand description
ยงLocalhost Plugin Module
Configures and creates the Tauri localhost plugin with CORS headers for Service Workers and an OTLP proxy for build-baked telemetry.
Constantsยง
- OTLP_
HOST ๐ - OTLP collector host:port. OTELBridge.ts sends to
/v1/traces(same-origin), this proxy forwards to the real collector via raw TCP. Zero CORS issues.
Functionsยง
- Localhost
Plugin - Creates and configures the localhost plugin with CORS headers preconfigured.
- Mime
From ๐Url - Resolve the correct
Content-Typefor a request URL by its file extension. - Proxy
ToOTLP ๐ - Forward a JSON body to the OTLP collector via raw HTTP/1.1 POST. Returns true if the collector accepted (2xx), false otherwise.