Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: allow requests from electron renderer #201

Merged
merged 2 commits into from
Sep 7, 2020

Commits on Aug 28, 2020

  1. 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.
    achingbrain committed Aug 28, 2020
    Configuration menu
    Copy the full SHA
    1adba2b View commit details
    Browse the repository at this point in the history
  2. chore: fix formatting

    achingbrain committed Aug 28, 2020
    Configuration menu
    Copy the full SHA
    d470f38 View commit details
    Browse the repository at this point in the history