Git Product home page Git Product logo

vary's People

Contributors

dougwilson avatar nook-scheel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vary's Issues

A problem when I install vary

npm install vary -g
2017-09-25T07_23_50_139Z-debug.log

npm ERR! Unexpected end of input at 1:1906
npm ERR! rtest":"1.1.0"},"directories":{},"dist":{"shasum":"67535ebb694c1d5225
npm ERR! ^

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\lhz\AppData\Roaming\npm-cache_logs\2017-09-25T07_23_50_139Z-debug.log

match express API

i think defaulting to * is silly. i'd rather throw. no app should ever do that because it destroys any possibility of caching.

but also, express supports arrays

Avoid using res

Since i emitted a lil critic of this module in a blog post i think i have to submit an issue for the problem i raise in it to be totally fair.

I think this module should not assume its users to have any res object and stay the closest possible to the problem it solves by letting users to define were they want to pick/set the vary header value:

const value = res.getHeader('Vary');

const newValue = vary(value, 'Origin')

res.setHeader('Vary', newValue);

In short, it should be more functionnal ;). I know it is a breaking change and you probably do not plan to do so but just dropping the idea.

For ref.:
https://github.com/nfroidure/blog/blob/4b6bfdccea8ad404dcc2bc116fa609f220388a5c/contents/pages/en/blog/http_rest_apis_with_nodejs.html#L346-L360
Till a draft

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.