benweet / stackedit

In-browser Markdown editor
https://stackedit.io/
Apache License 2.0
21.69k stars 2.72k forks source link

Error 404 and cross-origin request blocked while cors allowed it #698

Open makhashli opened 9 years ago

makhashli commented 9 years ago

Dear hope you're fine and doing well.

I'm using the stackedit and running it on a local server. Now what I want is to configure it for my own smileupps.com couchdb. I already configured the cors to allow both localhost and stackedit.io. But it always return 404 error and on inspector it return a 405 method not allowd. While the console showing cross-origin request blocked this is happen when I change both local or stackedit.io couchdb url.

Any hint ?

makhashli commented 9 years ago

With the same settings on smilluppy it wasn't working but with same configuration on iriscouchdb everything was working just fine. Maybe it was a matter of configuration.

vnodeng commented 8 years ago

I've encountered the same problem and it is indeed lies in the server configuration. Instead of

origins = http://localhost, https://stackedit.io

use

origins = http://localhost, http://localhost:5000, https://stackedit.io

i.e., port number in the URL is mandatory for couchdb.