Git Product home page Git Product logo

Comments (12)

yakovkhalinsky avatar yakovkhalinsky commented on August 29, 2024

Hi @dialelo Drakov has the method argument, which adds the Access-Control-Allow-Methods, I'm not sure if there is a specific use case where would need to automagically respond the the OPTIONS header.

We prefer that Drakov respects the blueprint files themselves.

Let me know your thoughts.

from drakov.

 avatar commented on August 29, 2024

We prefer that Drakov respects the blueprint files themselves.

Makes sense, although documenting OPTIONS requests for every URL in the API can get a bit tedious. Since you have access to the metadata required for Access-Control-Allow-Methods and Access-Control-Allow-Headers i thought it'd be cool to automatically respond to OPTIONS requests.

from drakov.

matthewwithanm avatar matthewwithanm commented on August 29, 2024

@yakovkhalinsky The specific use case is preflighted requests. Normally this isn't something you'd want to have to specify for every resource; it's more of a global API setting (usually accomplished with middleware) along with other CORS behavior.

from drakov.

 avatar commented on August 29, 2024

Exactly.

from drakov.

yakovkhalinsky avatar yakovkhalinsky commented on August 29, 2024

Mmm reading that info on the preflighted requests, it makes sense.

We'll have a look at this and look at incorporate something in a release for next week 👍

from drakov.

 avatar commented on August 29, 2024

Great news, glad to read that.

from drakov.

matthewwithanm avatar matthewwithanm commented on August 29, 2024

Awesome, thanks!

from drakov.

MichielDeMey avatar MichielDeMey commented on August 29, 2024

👍 I was also looking for this feature.

from drakov.

MartinNuc avatar MartinNuc commented on August 29, 2024

I submitted pull request for this here: #59

from drakov.

yakovkhalinsky avatar yakovkhalinsky commented on August 29, 2024

Dealt with in PR #59

from drakov.

 avatar commented on August 29, 2024

Great, thanks for your time!

from drakov.

yakovkhalinsky avatar yakovkhalinsky commented on August 29, 2024

A big thank you to @MartinNuc for his PR to add this feature 👍

from drakov.

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.