Closed farooqkz closed 3 years ago
It does use the GitHub mirror, here: https://github.com/jkelol111/webstore/blob/master/src/assets/js/index/workers/store-worker.js#L9
Yeah you have done. I just looked into Network tab and I noticed it sends an "OPTIONS" request to the server and the Github mirror sends "405 Method Not Allowed" and your software doesn't seem to handle that(At least I never see a list of apps).
Another thing is that you are using the old URL of mirror which is still working but it is recommended that you use the new one which its link is in my first post.
If you let me, I can send a PR.
I have tried changing it to the new mirror in the latest commit.
Please read my last message again. That might not be enough.
Did you run this from localhost, or is it running live on the server? If I'm not mistaken, this is a CORS issue.
I am trying https://jkelol111.github.io/webstore which redirects to store.bananahackers.net
I will soon send you more debug information from Network and Console tabs and possibly send a PR.
Sure.
I figured out why this happens but I don't know how to fix it. There are 2 problems here:
data.json
but it waits too long time and then it switches to Github. I suggest setting a timeout value. 5-10 seconds seem reasonable.OPTIONS
request is sent to Github and it responses with 405 Method not Allowed.After digging into source code(https://github.com/jkelol111/webstore/blob/master/src/assets/js/index/workers/store-worker.js#L100), I realized that you use GET
rather than OPTIONS
so that's why I don't know where the problem is.
(BTW, in README.md replace "shangul" with "Farooq Karimi Zadeh")
I can give you ssh access to my NanoPi in Iran so that you can setup a simple proxy there and test and see for yourself. The internet connection is however so creepy at the moment.
I found this: https://stackoverflow.com/questions/8153832/xmlhttprequest-changes-post-to-option
This is probably a CORS issue between *.github.io domains (I have had this happen in OpenRevise 2, another project of mine).
Will change the name for you in the README.md file :)
So what are you going to do to solve this problem?
How about this? https://en.wikipedia.org/wiki/JSONP#Script_element_injection
It is said that it's unsafe in general but we are sure about the data we have since we generate it ourselves.
@jkelol111 You have forgotten to do this:
gulp
git add docs
git commit -m "build"
git push
I already did build it in a separate commit.
Is your feature request related to a problem? Please describe. Users with an IP address from Iran and probably many other countries like China cannot use this store(practically)
Describe the solution you'd like Use the Github mirror if you couldn't access Gitlab after a try or two.