Comment on app.manifest exclusion.

This commit is contained in:
Nick Martin
2013-02-01 11:20:22 -08:00
parent 0fcb503fa4
commit 48010de100

View File

@@ -124,7 +124,15 @@ var run = function () {
app.use(function (req, res) {
// prevent these URLs from returning app_html
if (_.indexOf(['/app.manifest', '/favicon.ico', '/robots.txt'], req.url) !== -1) {
//
// NOTE: app.manifest is not a web standard like favicon.ico and
// robots.txt. It is a file name we have chosen to use for HTML5
// appcache URLs. It is included here to prevent using an appcache
// then removing it from poisoning an app permanently. Eventually,
// once we have server side routing, this won't be needed as
// unknown URLs with return a 404 automatically.
if (_.indexOf(['/app.manifest', '/favicon.ico', '/robots.txt'], req.url)
!== -1) {
res.writeHead(404);
res.end();
return;