Closed Harman-singh-waraich closed 4 months ago
Name | Link |
---|---|
Latest commit | 0cbb07a842e051e5663cd9b63e0212c2b88dd127 |
Latest deploy log | https://app.netlify.com/sites/kleros-api/deploys/666451abae37020008d5283c |
Deploy Preview | https://deploy-preview-15--kleros-api.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
The recent changes update the CID scheme in the upload-to-ipfs
module from ipfs://cid
to /ipfs/cid
. Additionally, a new conditional block has been added to handle preflight CORS requests in the handler
function by returning a specific response when the HTTP method is "OPTIONS".
File | Change Summary |
---|---|
README.md | Updated the summary to reflect the change in CID scheme and added details about the new CORS handling. |
functions/upload-to-ipfs.ts | Added logic to handle preflight CORS requests by checking the httpMethod and responding accordingly. |
sequenceDiagram
participant Client
participant Handler
participant IPFS
Client->>Handler: HTTP Request (OPTIONS)
Handler-->>Client: Response with CORS headers
Client->>Handler: HTTP Request (POST/GET)
Handler->>IPFS: Upload to IPFS
IPFS-->>Handler: Return CID
Handler-->>Client: Response with /ipfs/cid
In a world of bytes and files so grand,
A change was made by a coder's hand.
Fromipfs://
to/ipfs/
we go,
And CORS requests now smoothly flow.
The code evolves, itβs quite a sight,
Uploading to IPFS feels just right!
πβ¨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
ipfs://cid
to/ipfs/cid
for improved compatibility.Bug Fixes