Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Added support for /robots.txt and fixed JSLint errors #565

Merged
merged 2 commits into from
Oct 12, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions lib/app/middleware/mojito-handler-static.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/


/*jslint anon:true, sloppy:true, nomen:true*/
/*jslint node:true, anon:true, sloppy:true, nomen:true, todo:true */


/*
Expand Down Expand Up @@ -198,9 +198,14 @@ function staticProvider(store, globalLogger) {

// Use the resource store as a URI "rewriter" here.
// /favicon.ico is sent to ./my_app_folder/assets/favicon.ico
// /robots.txt is sent to ./my_app_folder/assets/robots.txt
// /crossdomain.xml is sent to ./my_app_folder/assets/crossdomain.xml
filename = urls[path];
// TODO: [Issue 80] remove this for performance
if ((!filename) && (path === '/favicon.ico')) {
if (!filename &&
(path === '/favicon.ico' ||
path === '/robots.txt' ||
path === '/crossdomain.xml')) {
filename = pa.join(store._config.root, 'assets', path);
}

Expand Down