1. 07 Sep, 2020 1 commit
    • Alex Potsides's avatar
      fix: allow requests from electron renderer (#201) · bb36028e
      Alex Potsides authored
      * 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.
      bb36028e
  2. 29 Apr, 2020 1 commit
  3. 06 Apr, 2020 2 commits
  4. 04 Apr, 2020 1 commit
    • Steven Allen's avatar
      change HandledMethods to AllowGet and cleanup method handling · 3093cad8
      Steven Allen authored
      Allowing methods isn't as simple as just allowing/disallowing them because
      different methods do different things.
      
      * HEAD: should be allowed everywhere GET is allowed.
      * OPTIONS:
        * When a CORS request is made, this will be handled by the CORS library.
        * Otherewise, we need to return the allowed methods.
      * POST: always allowed.
      * Everything else: always denied.
      
      Changing HandledMethods to a simple AllowGet makes it easier to "do the right
      thing".
      3093cad8
  5. 03 Apr, 2020 1 commit
    • Hector Sanjuan's avatar
      Http API: introduced HandledMethods option. · 2fbebbec
      Hector Sanjuan authored
      This Handler option is used it to allow/deny request by their method.
      
      The API is an RPC API so it normally should only work with PUT, but we also
      use a read-only, GET-based partial API that runs with the gateway.
      
      This commit makes the actual allowed (or handled) methods configurable.
      
      A test is added, and test facilities improved to be able to set/modify
      this option.
      2fbebbec
  6. 08 Jan, 2018 1 commit
  7. 22 Dec, 2017 1 commit
  8. 21 Dec, 2017 1 commit