Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: allow requests from electron renderer (#201)
* fix: allow requests from electron renderer The Electron Renderer process runs in an embedded browser window so has access to browser-native `fetch`. If this is used by `ipfs-http-client` to make requests against the HTTP API, the `User-Agent` header is set to a value that looks similar to a browser but no `Origin` or `Referer` headers are sent. The change here is to relax the user agent check to allow through requests from clients with `'Electron'` in their user agents.
- Loading branch information