Giter Club home page Giter Club logo

Comments (3)

edsonribeiro13 avatar edsonribeiro13 commented on June 8, 2024 1

curl that's working normally

curl -i -X GET http://localhost:8005/databases -H "Content-Type: application/json" -H "Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.e30.6y42esKnQjjLWRwENxx3lTm_ZYuOYrO6TBKFxEj6SHQ"

If I try a OPTIONS with one of my endpoints of custom querys I receive the follow message:

"error": "could not get script sum/sum, invalid http method OPTIONS"

Like if the OPTIONS was not configured, reforcing the bug report

from prest.

avelino avatar avelino commented on June 8, 2024

Shares the way you made the request (if possible using curl)

from prest.

edsonribeiro13 avatar edsonribeiro13 commented on June 8, 2024

So it appears that this is the problem: https://stackoverflow.com/questions/39066786/cors-prevent-preflight-of-request-with-authorization-header
Me and my team worked on a pre-response from nginx for OPTIONS request and the authentication worked, but I think the server should be able to deal with simple-requests even with authorization being passed (example: https://blog.morethancode.dev/killing-cors-preflight-requests-on-a-react-spa/) and to have a pre-response ready with headers and a 204 status to this kinda of method.

from prest.

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.