node-http-server – Diff between revs 34 and 35
?pathlinks?
Rev 34 | Rev 35 | |||
---|---|---|---|---|
Line 33... | Line 33... | |||
33 | accept: [ |
33 | accept: [ |
|
34 | /^.+\.html$/, |
34 | /^.+\.html$/, |
|
35 | /^.+\.css$/, |
35 | /^.+\.css$/, |
|
36 | /^.+\.js$/, |
36 | /^.+\.js$/, |
|
37 | /^.+\.png$/, |
37 | /^.+\.png$/, |
|
- | 38 | /^.+\.jpg$/, |
||
- | 39 | /^.+\.gif$/, |
||
38 | /^.+\.ico$/, |
40 | /^.+\.ico$/, |
|
39 | /^.+\.woff$/, |
41 | /^.+\.woff$/, |
|
40 | /^.+\.woff2$/, |
42 | /^.+\.woff2$/, |
|
41 | /^.+\.map$/, |
43 | /^.+\.map$/, |
|
42 | /^.+\.ttf$/, |
44 | /^.+\.ttf$/, |
|
43 | /^.+\.svg$/, |
45 | /^.+\.svg$/, |
|
44 | /^.*\.md$/ |
46 | /^.*\.md$/, |
|
- | 47 | /^.*\.pdf$/, |
||
- | 48 | /^.*\.map$/ |
||
45 | ], |
49 | ], |
|
46 | // Any files matching these regular expressions will never be offered. |
50 | // Any files matching these regular expressions will never be offered. |
|
47 | reject: [ |
51 | reject: [ |
|
48 | /^\.bashrc$/ |
52 | /^\.bashrc$/ |
|
49 | ], |
53 | ], |
|
- | 54 | // Cache expiry time in seconds for various files - a map of seconds |
||
- | 55 | // to cache to regular expressions matching a local filesystem path. |
||
- | 56 | cache: { |
||
- | 57 | 3600: [ |
||
- | 58 | /\.png$/, |
||
- | 59 | /\.jpg$/, |
||
- | 60 | /\.js$/, |
||
- | 61 | /\.css$/, |
||
- | 62 | /\.map$/ |
||
- | 63 | ], |
||
- | 64 | 60: [ |
||
- | 65 | /\/js\/?$/ |
||
- | 66 | ] |
||
- | 67 | }, |
||
50 | // Simple re-writing capabilities. |
68 | // URL re-writing. |
|
51 | rewrite: { |
69 | rewrite: { |
|
52 | 'index.html' : /^\/((?!(bower_components|js|css|img|doc))|\/)(.+?)$/g |
70 | //'index.html' : /^\/((?!(bower_components|js|css|img|doc))|\/)(.+?)$/g |
|
53 | }, |
71 | }, |
|
54 | // The name of the website. |
72 | // The name of the website. |
|
55 | name: 'Wizardry and Steamworks', |
73 | name: 'Wizardry and Steamworks', |
|
56 | }, |
74 | }, |
|
57 | ssl: { |
75 | ssl: { |