Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

fix: disable cors by default #3275

Merged
merged 10 commits into from
Sep 14, 2020
Merged

fix: disable cors by default #3275

merged 10 commits into from
Sep 14, 2020

Commits on Sep 9, 2020

  1. fix: disable cors by default

    Brings js-ipfs into line with go-ipfs by not having CORS on by default,
    instead requiring the user to explicitly configure it.
    
    BREAKING CHANGE:
    
    - CORS origins will need to be [configured manually](https://github.com/ipfs-inactive/js-ipfs-http-client#cors)
    achingbrain committed Sep 9, 2020
    Configuration menu
    Copy the full SHA
    64594a7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e5e0233 View commit details
    Browse the repository at this point in the history
  3. chore: pr comments

    Co-authored-by: Marcin Rataj <lidel@lidel.org>
    achingbrain and lidel committed Sep 9, 2020
    Configuration menu
    Copy the full SHA
    914dcd0 View commit details
    Browse the repository at this point in the history

Commits on Sep 10, 2020

  1. chore: handle preflight correctly

    Browsers send OPTIONS requests as preflight CORS checks when the
    client has done something like specified custom headers.
    
    Removes the blanket 405 handlers in order to use HAPI's default
    404 when the preflight request-method is for a resource that does
    not exist, though retain the 405 behaviour if a request with a non-POST
    or non-OPTION method is actually received.
    achingbrain committed Sep 10, 2020
    Configuration menu
    Copy the full SHA
    2c1c506 View commit details
    Browse the repository at this point in the history
  2. chore: make 405 responses rfc7231 compliant

    "The origin server MUST generate an
       Allow header field in a 405 response containing a list of the target
       resource's currently supported methods."
    
    https://tools.ietf.org/html/rfc7231#section-6.5.5
    achingbrain committed Sep 10, 2020
    Configuration menu
    Copy the full SHA
    c42bc16 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    62cddf6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b0ad575 View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2020

  1. chore: fix typo

    Co-authored-by: Marcin Rataj <lidel@lidel.org>
    achingbrain and lidel committed Sep 11, 2020
    Configuration menu
    Copy the full SHA
    c667f14 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    88c4a6f View commit details
    Browse the repository at this point in the history

Commits on Sep 14, 2020

  1. Configuration menu
    Copy the full SHA
    25e00e7 View commit details
    Browse the repository at this point in the history