Comments (5)
Ah, yeah, this was developed for server-side JS, so you're going to get CORS issues unless we switch to using JSONP. I don't think there's a setting that will let us get around that.
I wouldn't be opposed to adding that functionality, though. I don't see any reason why this module couldn't also work in a browser environment.
from wikiquote.
That would be really helpful. I'm attempting to build a little app that lets the user get a random quote upon user input and I would like to keep it all client-side if possible. Great work on this btw! A promise-based interface for the wikiquote API is a god-send.
from wikiquote.
Hi, I am also getting this CORS issue, and I am also trying to build a random quote machine. Has this been patched?
from wikiquote.
Hey @RizwanSyed357, no, I haven't patched this yet. I use it primarily on the server, so I haven't hit the CORS issue myself. I'll take a look into adding it, but I'd appreciate a PR if you wanna take a stab at it.
from wikiquote.
This might be helpful. I've had success with CORS in browser on wikimedia apis just by adding &origin=*
to the request. It could be pretty easy to modify each request to add this.
https://www.mediawiki.org/wiki/API:Cross-site_requests
from wikiquote.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wikiquote.