Giter Site home page Giter Site logo

Comments (5)

tellison avatar tellison commented on July 23, 2024

I'm not able to reproduce the problem Michael (@aixtools). I get a 404 NotFound error as expected rather than a NetworkError which is what you noted.

Please can you retry and see if the networking error still occurs?

Screenshot 2022-02-28 at 15 24 18

from api.adoptium.net.

johnoliver avatar johnoliver commented on July 23, 2024

I think the issue is you have given a url that actually exists, so should not 404, in fact will 302 you to the binary you requested, unfortunately what probably happened is that your browser blocked the 302 redirect to github due to CORS.

from api.adoptium.net.

karianna avatar karianna commented on July 23, 2024

Leaving this open in case we can figure out a CORS workaround.

from api.adoptium.net.

aixtools avatar aixtools commented on July 23, 2024

I don't think it is a 302 blocking - why for this site only?

a) iirc, the old swagger api redirect to the new site - and those work fine.
b) this is not a browser failing - initially - but a 'fetch' using adoptium. The display above was to make it clearer why what was being returned by the API was not working.

from api.adoptium.net.

netomi avatar netomi commented on July 23, 2024

I could reproduce the problem with firefox. Debugging it on firefox shows a CORS Missing Allow origin error.
Also looking at the request being made to github.com, there are no cors request headers present, although it is configured in the application.properties file.

Looking at the configuration at

the problem might be with the use of wildcards:

quarkus.http.cors=true
quarkus.http.cors.origins=*
quarkus.http.cors.methods=*
quarkus.http.cors.headers=*

quarkus.http.cors.methods does not support a '*' wildcard afaict from the source code:

https://github.com/quarkusio/quarkus/blob/4746a6925eea344c6ee2ea80cf5ee1e1c8801c4b/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/cors/CORSFilter.java#L42

so the configuration would specify that for a '*' request, the cors headers are added, but a request method like that does not exist ofc. I would suggest to explicitly set this to 'GET, OPTIONS', or leave that setting empy which should default to all afaict.

Link to the quarkus documentation: https://quarkus.io/guides/http-reference#cors-filter

from api.adoptium.net.

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.