mirror of
https://github.com/bckelley/cgm-remote-monitor.git
synced 2026-08-24 03:14:12 -05:00
put everything in a static directory
Tested by deleting everything, running npm install from scratch. This helps ensure that only the files in the static subdirectory can be served. Should eliminate serving config files via http.
This commit is contained in:
+4
-1
@@ -3,4 +3,7 @@ node_modules/
|
||||
|
||||
.idea/
|
||||
*.iml
|
||||
my.env
|
||||
my.env
|
||||
*.env
|
||||
static/bower_components/
|
||||
.*.sw?
|
||||
|
||||
@@ -83,7 +83,8 @@ var app = express();
|
||||
app.set('title', 'Nightscout');
|
||||
|
||||
// define static server
|
||||
var server = express.static(__dirname);
|
||||
var staticDir = __dirname + '/static/';
|
||||
var server = express.static(staticDir);
|
||||
app.use(function(req, res, next) {
|
||||
res.set({
|
||||
"Cache-Control": "public, max-age=" + THIRTY_DAYS,
|
||||
|
||||
|
Before Width: | Height: | Size: 318 B After Width: | Height: | Size: 318 B |
|
Before Width: | Height: | Size: 883 KiB After Width: | Height: | Size: 883 KiB |
Reference in New Issue
Block a user