-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix CORS bug #88
Fix CORS bug #88
Conversation
'Access-Control-Allow-Origin': '*' -> mode: cors
Codecov Report
@@ Coverage Diff @@
## master #88 +/- ##
=======================================
Coverage 95.45% 95.45%
=======================================
Files 1 1
Lines 22 22
Branches 6 6
=======================================
Hits 21 21
Misses 1 1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, thanks
## [1.3.4](1.3.3...1.3.4) (2020-11-09) ### Bug Fixes * CORS bug ([#88](#88)) ([2a5b5d1](2a5b5d1))
🎉 This PR is included in version 1.3.4 🎉 The release is available on: Your semantic-release bot 📦🚀 |
# 1.0.0 (2023-04-26) ### Bug Fixes * **build:** publish types in package.json ([174afe8](174afe8)) * CORS bug ([decentralized-identity#88](https://github.com/veramolabs/plc-did-resolver/issues/88)) ([2a5b5d1](2a5b5d1)) * **deps:** bump did-resolver to 3.1.0 ([08358ec](08358ec)) * **deps:** bump did-resolver to 3.1.3 ([f62af45](f62af45)) * **deps:** groom the build scripts and dependencies ([decentralized-identity#120](https://github.com/veramolabs/plc-did-resolver/issues/120)) ([757f6ec](757f6ec)) * **deps:** pin dependencies ([decentralized-identity#89](https://github.com/veramolabs/plc-did-resolver/issues/89)) ([926eb1f](926eb1f)) * **deps:** update all non-major dependencies ([decentralized-identity#93](https://github.com/veramolabs/plc-did-resolver/issues/93)) ([13d8f18](13d8f18)) * **deps:** update all non-major dependencies to v17.0.2 ([0e9e2f0](0e9e2f0)) * **deps:** update all non-major dependencies to v18.1.0 ([cd3ed19](cd3ed19)) * **deps:** update all non-major dependencies to v18.2.0 ([cd99aa3](cd99aa3)) * **deps:** update dependencies, remove ts-jest ([789ec69](789ec69)) * **deps:** update dependency did-resolver to v1.1.0 ([decentralized-identity#39](https://github.com/veramolabs/plc-did-resolver/issues/39)) ([4ade39d](4ade39d)) * **deps:** update dependency did-resolver to v2 ([decentralized-identity#56](https://github.com/veramolabs/plc-did-resolver/issues/56)) ([b420866](b420866)) * **deps:** update dependency did-resolver to v2.1.1 ([decentralized-identity#70](https://github.com/veramolabs/plc-did-resolver/issues/70)) ([0a0f902](0a0f902)) * **deps:** update dependency did-resolver to v3 ([decentralized-identity#94](https://github.com/veramolabs/plc-did-resolver/issues/94)) ([18d1a1d](18d1a1d)) * **deps:** Update dependency did-resolver to v3.1.1 ([91cc1c6](91cc1c6)) * **deps:** Update dependency did-resolver to v3.1.2 ([7902b3f](7902b3f)) * **deps:** Update dependency did-resolver to v3.1.3 ([d77839f](d77839f)) * **deps:** Update dependency did-resolver to v3.1.4 ([02d4c7d](02d4c7d)) * **deps:** Update dependency did-resolver to v3.1.5 ([0728ffb](0728ffb)) * **deps:** Update dependency did-resolver to v3.2.0 ([d33f51e](d33f51e)) * **deps:** Update dependency did-resolver to v3.2.2 ([f494fbe](f494fbe)) * **deps:** Update dependency did-resolver to v4 ([74b825f](74b825f)) * **deps:** Update dependency did-resolver to v4.0.1 ([63d7fc2](63d7fc2)) * **deps:** Update dependency did-resolver to v4.1.0 ([81fa649](81fa649)) * **deps:** update dependency react-scripts to v5 ([bbc4b35](bbc4b35)) * **deps:** update dependency react-scripts to v5.0.1 ([36d0e22](36d0e22)) * **deps:** update react monorepo to v18 ([8f21c88](8f21c88)) * remove checks for a [@context](https://github.com/context) field ([b814b6c](b814b6c)), closes [decentralized-identity#26](https://github.com/veramolabs/plc-did-resolver/issues/26) ### Features * forked web-did-resolver and refactored to be plc-did-resolver ([7fdeefe](7fdeefe)) * remove default export ([3952bef](3952bef)) * remove default export ([9ef0b37](9ef0b37)) * support for path in the did ([904d88c](904d88c)), closes [decentralized-identity#32](https://github.com/veramolabs/plc-did-resolver/issues/32) [decentralized-identity#33](https://github.com/veramolabs/plc-did-resolver/issues/33) * update to latest did spec ([decentralized-identity#92](https://github.com/veramolabs/plc-did-resolver/issues/92)) ([4779436](4779436)), closes [decentralized-identity#91](https://github.com/veramolabs/plc-did-resolver/issues/91) * use cross-fetch instead of XMLHttpRequest ([decentralized-identity#15](https://github.com/veramolabs/plc-did-resolver/issues/15)) ([dadf682](dadf682)) * use cross-fetch instead of XMLHttpRequest ([decentralized-identity#15](https://github.com/veramolabs/plc-did-resolver/issues/15)) ([4378c71](4378c71)) ### BREAKING CHANGES * Resolver now returns a `DIDResolutionResult` that wraps a DIDDocument. No errors are thrown, instead returned as `didResolutionMetadata.error/message`
# 1.0.0 (2024-01-22) ### Bug Fixes * CORS bug ([decentralized-identity#88](https://github.com/veramolabs/peer-did-resolver/issues/88)) ([2a5b5d1](2a5b5d1)) * **deps:** bump @aviarytech/did-peer to 0.0.22 ([#3](#3)) ([3605a4a](3605a4a)) * **deps:** bump did-resolver to 3.1.0 ([08358ec](08358ec)) * **deps:** bump did-resolver to 3.1.3 ([f62af45](f62af45)) * **deps:** groom the build scripts and dependencies ([decentralized-identity#120](https://github.com/veramolabs/peer-did-resolver/issues/120)) ([757f6ec](757f6ec)) * **deps:** pin dependencies ([decentralized-identity#89](https://github.com/veramolabs/peer-did-resolver/issues/89)) ([926eb1f](926eb1f)) * **deps:** update all non-major dependencies ([decentralized-identity#93](https://github.com/veramolabs/peer-did-resolver/issues/93)) ([13d8f18](13d8f18)) * **deps:** update all non-major dependencies to v17.0.2 ([0e9e2f0](0e9e2f0)) * **deps:** update all non-major dependencies to v18.1.0 ([cd3ed19](cd3ed19)) * **deps:** update all non-major dependencies to v18.2.0 ([cd99aa3](cd99aa3)) * **deps:** update dependencies, remove ts-jest ([789ec69](789ec69)) * **deps:** update dependency did-resolver to v1.1.0 ([decentralized-identity#39](https://github.com/veramolabs/peer-did-resolver/issues/39)) ([4ade39d](4ade39d)) * **deps:** update dependency did-resolver to v2 ([decentralized-identity#56](https://github.com/veramolabs/peer-did-resolver/issues/56)) ([b420866](b420866)) * **deps:** update dependency did-resolver to v2.1.1 ([decentralized-identity#70](https://github.com/veramolabs/peer-did-resolver/issues/70)) ([0a0f902](0a0f902)) * **deps:** update dependency did-resolver to v3 ([decentralized-identity#94](https://github.com/veramolabs/peer-did-resolver/issues/94)) ([18d1a1d](18d1a1d)) * **deps:** Update dependency did-resolver to v3.1.1 ([91cc1c6](91cc1c6)) * **deps:** Update dependency did-resolver to v3.1.2 ([7902b3f](7902b3f)) * **deps:** Update dependency did-resolver to v3.1.3 ([d77839f](d77839f)) * **deps:** Update dependency did-resolver to v3.1.4 ([02d4c7d](02d4c7d)) * **deps:** Update dependency did-resolver to v3.1.5 ([0728ffb](0728ffb)) * **deps:** Update dependency did-resolver to v3.2.0 ([d33f51e](d33f51e)) * **deps:** Update dependency did-resolver to v3.2.2 ([f494fbe](f494fbe)) * **deps:** Update dependency did-resolver to v4 ([74b825f](74b825f)) * **deps:** Update dependency did-resolver to v4.0.1 ([63d7fc2](63d7fc2)) * **deps:** update dependency react-scripts to v5 ([bbc4b35](bbc4b35)) * **deps:** update dependency react-scripts to v5.0.1 ([36d0e22](36d0e22)) * **deps:** update react monorepo to v18 ([8f21c88](8f21c88)) * remove checks for a [@context](https://github.com/context) field ([b814b6c](b814b6c)), closes [decentralized-identity#26](https://github.com/veramolabs/peer-did-resolver/issues/26) ### Features * refactor to resolve peer-did ([e04640c](e04640c)) * remove default export ([3952bef](3952bef)) * remove default export ([9ef0b37](9ef0b37)) * support for path in the did ([904d88c](904d88c)), closes [decentralized-identity#32](https://github.com/veramolabs/peer-did-resolver/issues/32) [decentralized-identity#33](https://github.com/veramolabs/peer-did-resolver/issues/33) * update to latest did spec ([decentralized-identity#92](https://github.com/veramolabs/peer-did-resolver/issues/92)) ([4779436](4779436)), closes [decentralized-identity#91](https://github.com/veramolabs/peer-did-resolver/issues/91) * use cross-fetch instead of XMLHttpRequest ([decentralized-identity#15](https://github.com/veramolabs/peer-did-resolver/issues/15)) ([dadf682](dadf682)) * use cross-fetch instead of XMLHttpRequest ([decentralized-identity#15](https://github.com/veramolabs/peer-did-resolver/issues/15)) ([4378c71](4378c71)) ### BREAKING CHANGES * Resolver now returns a `DIDResolutionResult` that wraps a DIDDocument. No errors are thrown, instead returned as `didResolutionMetadata.error/message`
Problem
I found the following CORS error in the daf/examples/react-app sample code.
The cause was the presence of
Access-Control-Allow-Origin
in the request header.Access-Control-Allow-Origin
is not required in the request header as it is a header that should be in the response header to allow CORS.Solution
Access-Control-Allow-Origin
tomode: cors
for fetch’s option.