nihgwu / hexo-hey

an admin plugin for hexo
http://nihgwu.github.io/hexo-hey/
MIT License
208 stars 39 forks source link

Unable to log in the admin page #7

Closed chaozh closed 9 years ago

chaozh commented 9 years ago

Unable to log in the admin page due to the cross site ajax request. XMLHttpRequest cannot load http://hey.liteneo.com/api/login. The 'Access-Control-Allow-Origin' header has a value 'http://nihgwu.github.io' that is not equal to the supplied origin. Origin 'http://localhost:4000' is therefore not allowed access.

nihgwu commented 9 years ago

take this demo for example, the hexo blog is hosted on DO white the hexo hey is hosted on Github, then you need to add http://nihgwu.github.io to your CORS whitelist to access the api provided by http://hey.liteneo.com/api so for the most situations the cors config is not nesserary

nihgwu commented 9 years ago

@chaozh surprised to find we are schoolmates :astonished:

nihgwu commented 9 years ago

sorry, i found that i add a custom apiurl for test but built in the release version, working on it

nihgwu commented 9 years ago

please update to v0.3.1

chaozh commented 9 years ago

Great! I'll have a try.

nihgwu commented 9 years ago

thanks for your feedback