Skip to content

CORS test sends non-CORS request #217

@achingbrain

Description

@achingbrain

There's a test:

"GET Responses from Gateway should include CORS headers allowing JS from other origins to read the data cross-origin."

It makes a GET request to "/ipfs/{{CID}}/" and expects Access-Control-Allow-Origin etc in the response.

The test sends:

GET /ipfs/bafkqabtimvwgy3yk/ HTTP/1.1
Host: host.docker.internal:8080
User-Agent: Go-http-client/1.1
Accept-Encoding: gzip

The fetch spec says:

A CORS request is an HTTP request that includes an Origin header. It cannot be reliably identified as participating in the CORS protocol as the Origin header is also included for all requests whose method is neither GET nor HEAD.

There is no Origin header in the request, so this is not a CORS request.

Why does the test expect CORS headers in the response?

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium: Good to have, but can wait until someone steps uphelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions