alexfigtree / CoreID

For MIT Human Dynamics group blockchain-backed individual identity open source prototype
MIT License
4 stars 5 forks source link

RPC handler for signing is failing due to CORS #36

Closed akscanb closed 7 years ago

akscanb commented 7 years ago

Failed to load resource: the server responded with a status of 501 (Not Implemented) documents:1 Fetch API cannot load http://localhost:8332/. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. The response had HTTP status code 501. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

I think there is potential way to proxy the requests through the webpack dev server, but unsure how to set that up correctly.

akscanb commented 7 years ago

To see the problem in action open up the app and chrome console and go to the documents page and click the sign button.

alexfigtree commented 7 years ago

I see that onClick handling hasn't been added to the Sign buttons. You'll need to call signDocument within the button and pass along document as an argument.

akscanb commented 7 years ago

I just took your signing buttons. I was going to later on reconfigure some stuff so it will generate views based on the JSON object. The signing buttons I'm referring to are the ones next to the stringified JSON objects.

akscanb commented 7 years ago

image

In the picture the signing buttons on the bottom left of the page should pass along the JSON document object next to it to signDocument.

akscanb commented 7 years ago

figure out a work around with nginx