tauri-apps / tauri-apps/plugins-workspace

[bug] using http plugin fetch replace window.fetch will cause page freezed

Open
#2,728 4 comments 0 reactions 0 assignees View on GitHub
plugin: http
Dominant language
Rust
Stars
1.8k
Forks
602
Avg merge
4d 14h
Merged PRs (30d)
9

Description

I want to use the fetch provided by @tauri-apps/plugin-http to replace window.fetch to avoid triggering CORS, but if I globally replace it in the following way, it causes the page to freeze.

Additionally, even calling other tauri::commands(such as `invoke('greet', { name: 'tauri' })`) also causes the page to freeze.

```js
import { fetch as tauriFetch } from '@tauri-apps/plugin-http'
window.fetch = tauriFetch
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.