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?
There's a test:
It makes a GET request to
"/ipfs/{{CID}}/"and expectsAccess-Control-Allow-Originetc in the response.The test sends:
The fetch spec says:
There is no
Originheader in the request, so this is not a CORS request.Why does the test expect CORS headers in the response?