howardwu / IPFS-Ethereum-Storage

A simple datastore solution using IPFS and Ethereum
Other
196 stars 59 forks source link

Cannot store any content #6

Open vsmelov opened 6 years ago

vsmelov commented 6 years ago

CORS problem appears when try to store any URL.

storeContent('http://google.ru')
undefined
storage.html:1 Failed to load http://google.ru/: Redirect from 'http://google.ru/' to 'http://www.google.ru/' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.
storage.html:107 Content submission error: Error: Client request error: XHR error
    at XMLHttpRequest.xhr.onerror (ipfs.js:46754)
(anonymous) @ storage.html:107
(anonymous) @ ipfs.js:27199
finish @ ipfs.js:15227
wrapped @ ipfs.js:8914
onError @ ipfs.js:15161
g @ ipfs.js:6180
EventEmitter.emit @ ipfs.js:6096
xhr.onerror @ ipfs.js:46754
XMLHttpRequest.send (async)
ClientRequest._onFinish @ ipfs.js:46758
(anonymous) @ ipfs.js:46639
EventEmitter.emit @ ipfs.js:6093
finishMaybe @ ipfs.js:24600
endWritable @ ipfs.js:24610
Writable.end @ ipfs.js:24580
ClientRequest.end @ ipfs.js:46829
internals.Client.request @ ipfs.js:15291
add @ ipfs.js:27198
storeContent @ storage.html:105
(anonymous) @ VM92:1

storeContent('https://habrahabr.ru')
undefined
storage.html:1 Failed to load https://habrahabr.ru/: Redirect from 'https://habrahabr.ru/' to 'https://habr.com/' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.
storage.html:107 Content submission error: Error: Client request error: XHR error
    at XMLHttpRequest.xhr.onerror (ipfs.js:46754)
vsmelov commented 6 years ago

The same error with static image