Skip to content

Commit

Permalink
Moved access.index to config/files.index
Browse files Browse the repository at this point in the history
  • Loading branch information
tshemsedinov committed Feb 14, 2015
1 parent cf22c3f commit 8eeaaf7
Show file tree
Hide file tree
Showing 21 changed files with 7 additions and 25 deletions.
Expand Up @@ -4,6 +4,5 @@ module.exports = {
http: true,
https: true,
intro: false,
index: true,
groups: []
};
Expand Up @@ -4,6 +4,5 @@ module.exports = {
http: true,
https: true,
intro: true,
index: false,
groups: []
};
Expand Up @@ -4,6 +4,5 @@ module.exports = {
http: true,
https: true,
intro: false,
index: false,
groups: []
};
Expand Up @@ -4,6 +4,5 @@ module.exports = {
http: true,
https: true,
intro: true,
index: false,
groups: []
};
Expand Up @@ -4,6 +4,5 @@ module.exports = {
http: true,
https: true,
intro: false,
index: false,
groups: []
};
@@ -1,4 +1,3 @@
module.exports = {
intro: false,
index: false
intro: false
};
@@ -1,4 +1,3 @@
module.exports = {
intro: false,
index: false
intro: false
};
@@ -1,4 +1,3 @@
module.exports = {
intro: false,
index: false
intro: false
};
Expand Up @@ -4,7 +4,6 @@
http: true,
https: true,
intro: true,
index: true,
virtual: true,
groups: []
};
Expand Up @@ -4,7 +4,6 @@ module.exports = {
http: true,
https: true,
intro: true,
index: false,
virtual: true,
groups: []
};
Expand Up @@ -4,6 +4,5 @@ module.exports = {
http: true,
https: true,
intro: false,
index: true,
groups: []
};
Expand Up @@ -4,6 +4,5 @@ module.exports = {
http: true,
https: true,
intro: false,
index: true,
groups: []
};
Expand Up @@ -4,6 +4,5 @@ module.exports = {
http: true,
https: true,
intro: false,
index: true,
groups: []
};
Expand Up @@ -4,6 +4,5 @@ module.exports = {
http: true,
https: true,
intro: false,
index: true,
groups: []
};
Expand Up @@ -4,6 +4,5 @@ module.exports = {
http: true,
https: true,
intro: false,
index: true,
groups: []
};
1 change: 0 additions & 1 deletion examples/sseTestApp/applications/example/app/access.js
Expand Up @@ -4,6 +4,5 @@ module.exports = {
http: true,
https: true,
intro: false,
index: true,
groups: []
};
1 change: 0 additions & 1 deletion examples/sseTestApp/applications/example/app/api/access.js
Expand Up @@ -4,6 +4,5 @@ module.exports = {
http: true,
https: true,
intro: true,
index: true,
groups: []
};
2 changes: 1 addition & 1 deletion lib/impress.application.js
Expand Up @@ -99,7 +99,7 @@ impress.mixinApplication = function(application) {
}
}

// Chacke system templates
// Check system templates
//
if (application !== impress) {
application.systemTemplates = {};
Expand Down
1 change: 0 additions & 1 deletion lib/impress.constants.js
Expand Up @@ -67,7 +67,6 @@ impress.DEFAULT_ACCESS = {
http: true, // allow via HTTP
https: true, // allow via HTTPS
intro: false, // allow API introspection
index: false, // allow directory index
virtual: false, // allow virtual folders if true or reply 404 if false
groups: [] // allow access for certain groups (ampty list allows to all)
};
Expand Down
2 changes: 1 addition & 1 deletion lib/impress.index.js
Expand Up @@ -9,7 +9,7 @@ Client.prototype.index = function(indexPath) {
client.execPath = client.realPath;
client.execPathDir = client.realPathDir;
client.fileHandler('access', false, function() {
if (client.access.index) {
if (application.config.files.index) {
if (!client.res.headersSent) client.res.setHeader('Content-Type', impress.MIME_TYPES['html']);
var files = [], dirs = [], dirPath = '';
client.url.split('/').forEach(function(dir) {
Expand Down
4 changes: 2 additions & 2 deletions schemas/config.application.definition.js
Expand Up @@ -27,11 +27,11 @@ module.exports = {

files: {
minify: 'false:boolean',
static: '[array]',

This comment has been minimized.

Copy link
@j-martyn

j-martyn Mar 4, 2015

Member

Causing error while statring app with config file file.js with content like
module.export(/*...*/ static: ['*.js', '*.css'] /*...*/)
Error like Unexpected name 'static', throwed from api.definition.validate.
Should be reviewed and tested.

cacheSize: '100mb:size',
cacheMaxFileSize: '1mb:size',
gzip: 'true:boolean',
preprocess: '[array]'
preprocess: '[array]',
index: 'false:boolean'
},

log: {
Expand Down

0 comments on commit 8eeaaf7

Please sign in to comment.