Skip to main content

LocalhostPlugin

Function LocalhostPlugin 

Source
pub fn LocalhostPlugin<R: Runtime>(ServerPort: u16) -> TauriPlugin<R>
Expand description

Creates and configures the localhost plugin with CORS headers preconfigured.

§CORS Configuration

  • Access-Control-Allow-Origin: * (allows all origins)
  • Access-Control-Allow-Methods: GET, POST, OPTIONS, HEAD
  • Access-Control-Allow-Headers: Content-Type, Authorization, Origin, Accept

§OTLP Proxy

Requests to /v1/traces are forwarded to the local OTLP collector (Jaeger, OTEL Collector, etc.) so OTELBridge.ts can send telemetry without cross-origin issues. Uses raw TCP - no extra HTTP client dependency.