Git Product home page Git Product logo

Comments (6)

joakimskoog avatar joakimskoog commented on July 17, 2024

Hello @MinimumViablePerson! Thank you for the kind words, it's always fun to hear from people that are using it. It sounds really weird that you're having CORS issues since that's enabled here.
What's even more interesting is that you only get it for House Stark. Could you please elaborate with some more information regarding your request payload and the response you're getting?

It would also be nice to see what code you're using to make the request itself.

from anapioficeandfire.

kazarinoff avatar kazarinoff commented on July 17, 2024

Hi @joakimskoog. I'm also having a similar issue, but with House Targaryn, as well as Tully, Aaryn, Baelish, and some others.
Using this jquery call: $.get("https://anapioficeandfire.com/api/houses/378",displaydata)
I get this error:
Access to XMLHttpRequest at 'https://anapioficeandfire.com/api/houses/378' from origin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

It works as expected with House Stark for me, not sure if that was an issue that got fixed because of this thread or just a coincidence.
Thanks!

from anapioficeandfire.

joakimskoog avatar joakimskoog commented on July 17, 2024

Hi,

Could you please provide the code for the request including how the HTTP request actually looks like. Would also be helpful to know from what URL you were calling the API.

Does it always happen for specific houses or is it something that comes and goes?

from anapioficeandfire.

baranna avatar baranna commented on July 17, 2024

I'm also having CORS issues.
If I'm calling get(https://anapioficeandfire.com/api/characters?name=Jon Snow) I get CORS error:

"Access to XMLHttpRequest at 'https://anapioficeandfire.com/api/characters?name=Jon%20Snow' from origin 'http://localhost:4200' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource."

While calling eg. get(https://anapioficeandfire.com/api/characters?name=Jaime Lannister) there's NO error.

from anapioficeandfire.

MinimumViablePerson avatar MinimumViablePerson commented on July 17, 2024

I've just tested the @baranna 's Jon Snow endpoint and I also get a CORS error on that one but not on others, like Arya Stark. This is bastardism! 😋

image

from anapioficeandfire.

lorrydriveloper avatar lorrydriveloper commented on July 17, 2024

It may help somebody.
I get the same problem when trying to fetch(https://anapioficeandfire.com/api/books) but when adding / after books it solves the CORS policy problem.

from anapioficeandfire.

Related Issues (20)

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.