Skip to content

Conversation

@mallochine
Copy link
Contributor

@mallochine mallochine commented May 23, 2021

sry about that. I didn't properly test last time. I tested it properly this time.

How to test

  1. setup blobber to run on localhost as instructed in README.
  2. Run this curl:
  curl -i 'http://localhost:5051/v1/file/upload/4e863327cf888dfd6ae87ebc7dbd6771741a4d7a0288527f213dd9a243dffad4' \
    -X 'OPTIONS' \
    -H 'Accept: */*' \
    -H 'Access-Control-Request-Method: POST' \
    -H 'Access-Control-Request-Headers: x-app-client-id,x-app-client-key' \
    -H 'Origin: http://localhost:82' \
    -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36' \
    -H 'Sec-Fetch-Mode: cors' \
    --compressed

Expect this output:

HTTP/1.1 200 OK
Access-Control-Allow-Headers: X-App-Client-Id,X-App-Client-Key
Access-Control-Allow-Origin: *
Date: Sun, 23 May 2021 00:50:00 GMT
Content-Length: 0

@anish-squareops anish-squareops merged commit 382ec92 into master May 25, 2021
@kushthedude kushthedude deleted the cors branch July 21, 2021 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants