Giter Club home page Giter Club logo

Comments (5)

fdesjardins avatar fdesjardins commented on August 19, 2024

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.

zachurich avatar zachurich commented on August 19, 2024

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.

rizsyed1 avatar rizsyed1 commented on August 19, 2024

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.

fdesjardins avatar fdesjardins commented on August 19, 2024

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.

phocks avatar phocks commented on August 19, 2024

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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.