Ignore files and directories with leading dots except .well-known

This commit is contained in:
Akihiko Odaki
2018-05-04 22:10:14 +09:00
parent 4843e9a40a
commit ba7525c676
2 changed files with 12 additions and 1 deletions

View File

@@ -150,6 +150,17 @@ describe('create_routes', () => {
);
});
it('ignores files and directories with leading dots except .well-known', () => {
const routes = create_routes({
files: ['.well-known', '.unknown']
});
assert.deepEqual(
routes.map(r => r.file),
['.well-known']
);
});
it('matches /foo/:bar before /:baz/qux', () => {
const a = create_routes({
files: ['foo/[bar].html', '[baz]/qux.html']