Coder Social home page Coder Social logo

don't touch original req/res about koa HOT 3 CLOSED

jonathanong avatar jonathanong commented on April 20, 2024
don't touch original req/res

from koa.

Comments (3)

tj avatar tj commented on April 20, 2024

that would be nice in some ways, I've found in practice usually the only thing you really want "raw" access to that has not been modified is the original request url, I've never seen anyone manipulate request headers or anything like that, definitely would be bad practice at least. For now I don't think it's worth it but maybe in the future

from koa.

jonathanong avatar jonathanong commented on April 20, 2024

yeah, this is the only case i can think of. if we don't edit req.url, we won't have to do any .originalUrl stuff, though you'll have to pass the mount points to sub apps somehow.

from koa.

jonathanong avatar jonathanong commented on April 20, 2024

merging into #49

from koa.

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.