GithubHelp home page GithubHelp logo

beeline's People

Contributors

jfhbrook avatar mauricebutler avatar xavi- avatar xp1 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

Watchers

 avatar  avatar  avatar

beeline's Issues

Named captures in regex

Hi,

Any plans or thoughts on making the regex matching support named subpatterns, so that we get not just the values but also the names of the "parameters", like in tokens, in the callback?

I realize this might require depending on another regex library than the core one. It would just be useful, I use named subpatterns/capturing groups all the time.

Thanks!

How to run tests

Hi Mate,

I am trying to make some additions to allow a cache max age to be optionally settable on static files but I cant get the tests to run. Can you let me know how you are running them?

I was going to convert them over to use tape and npm test but I didn't want to do so without making sure I can run them first.

staticDirHandler allows invalid mimeTypes

If one specifies mimeTypes without a leading dot, as the README tells you to, the file will be served without content-type.

The check for a valid file-request tests the file extension both with and without the leading dot. But later, when the mimeType is served, a mimeType with a leading dot is assumed.

My personal opinion is to be strict about this: require the dot to be present when one specifies the valid mimetypes, since this is the way that path.extname works.
Strict is (almost) always good. Strict keeps us from producing software like IE ;)

Btw, thanks for a neat router!

Unsecure implementation

Hi,

First, thanks for writing beeline!
Like its simplicity and usefulness.

Having said that, simplicity in this case should not come in the cost of security, right now (unless I missed something) beeline will allow you to go up the directory tree, for example:
http://localhost:8080/static/../../../log.txt
or worse still
http://localhost:8080/static/../../server.js (!!)
I started at looking to fix this issue in the code, but could not get the tests to run, can you please advise how to get them to run?

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.