Skip to main content

Module LocalhostPlugin

Module LocalhostPlugin 

Source
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§

LocalhostPlugin
Creates and configures the localhost plugin with CORS headers preconfigured.
ProxyToOTLP 🔒
Forward a JSON body to the OTLP collector via raw HTTP/1.1 POST. Returns true if the collector accepted (2xx), false otherwise.