xavi- / beeline Goto Github PK
View Code? Open in Web Editor NEWA laughably simplistic router for node.js
Home Page: xavi.co
A laughably simplistic router for node.js
Home Page: xavi.co
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!
How do I access POST parameters?
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?
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.
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!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.