docs.rs failed to build tauri-plugin-cors-fetch-5.0.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
tauri-plugin-cors-fetch-4.1.0

An unofficial Tauri plugin that enables seamless cross-origin (CORS) requests by transparently proxying the native fetch API through Tauri's HTTP client.
Features
- Zero Code Change: Use standard
fetch()as you normally would. - Streaming & SSE: Full support for Response Streaming and Server-Sent Events (SSE).
- Configurable: Granular control over which domains bypass CORS.
- Multi-platform: Supports Windows, macOS, Linux, iOS, and Android.
Quick Start
1. Install Dependencies
Add the plugin to your Cargo.toml:
# src-tauri
cargo add tauri-plugin-cors-fetch
2. Initialize Plugin
Register the plugin in your Tauri setup:
// src-tauri/src/lib.rs
3. Configure Permissions & Settings
Add the required permission to your capability file:
// src-tauri/capabilities/default.json
Ensure withGlobalTauri is enabled in tauri.conf.json:
// src-tauri/tauri.conf.json
Usage
Once initialized, the plugin automatically hooks into the global fetch. No changes to your frontend code are required:
// This request now bypasses CORS automatically
const response = await ;
const data = await response.;
Configuration
You can fine-tune the behavior via window.CORSFetch.config():
window.;
Direct Access APIs
window.fetchCORS(url, init): Explicitly use the CORS-bypassing fetch.window.fetchNative(url, init): Use the original browser fetch (subject to CORS).
Limitations
- Fetch Only: Does not support
XMLHttpRequest(XHR).
License
MIT License © 2024-PRESENT Del Wang