Giter Site home page Giter Site logo

Comments (2)

soundofjw avatar soundofjw commented on July 29, 2024

@rknLA @npbee I'd love your thoughts here :)

from pale.

rknLA avatar rknLA commented on July 29, 2024

Yeah, so looking at the _pre_response_handlers thing, a couple of thoughts come to mind:

  • First, assuming this is the right way to solve the problem, I'm not a huge fan of the name, since technically everything is "pre-response". If we wind up keeping the functionality, I would suggest calling it _after_render_handlers or _post_render_handlers or something along those lines, since it's more specific.
  • Second, is this the right way to solve this problem? I'm all for figuring out how to elegantly keep this if it's clear that it has uses beyond just CORS, but my gut reaction is that it might cause more headaches in a general state -- It confuses some of the structure and process. Adding a step to the execution pipeline outside of the try/except seems like it will better enable people to shoot themselves in the foot, and seems like it enables/encourages monkey-patching beyond what should be necessary. I completely understand why you put it outside of the try/except block, but it still makes me a bit uneasy.

CORS is a pretty specific problem, and imho, probably common enough in HTTP APIs to have CORS-specific functionality, rather than adding more generalization.

from pale.

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.