@@ -65,17 +65,17 @@ var apphandler = function( req, res, appdir ) {
65
65
66
66
auth = require ( appdir + "localauth" + "/app" ) ;
67
67
68
- /* Disabling authentication requirement.
68
+ /* Disabling authentication requirement. */
69
69
//Redirect to sign-in for unauthenticated users
70
- publicAllowed = ["auth"]; //apps that are exempt from any login (should only be auth)
71
- auth = require(appdir + "auth" + "/app");
72
- user = auth.isAuthenticated(req, res);
73
- if ( !user && publicAllowed.indexOf( appname ) < 0) {
74
- util.log("redirect: " + "http://" + getHost(req) + ":" + config.httpVisiblePort + '/app/auth');
75
- res.redirect("http://" + getHost(req) + ":" + config.httpVisiblePort + '/app/auth' );
76
- return;
77
- }
78
- */
70
+ // publicAllowed = ["auth"]; //apps that are exempt from any login (should only be auth)
71
+ // auth = require(appdir + "auth" + "/app");
72
+ // user = auth.isAuthenticated(req, res);
73
+ // if ( !user && publicAllowed.indexOf( appname ) < 0) {
74
+ // util.log("redirect: " + "http://" + getHost(req) + ":" + config.httpVisiblePort + '/app/auth');
75
+ // res.redirect("http://" + getHost(req) + ":" + config.httpVisiblePort + '/app/auth' );
76
+ // return;
77
+ // }
78
+
79
79
80
80
if ( ! apppath ) {
81
81
apppath = "/" ;
@@ -164,7 +164,7 @@ localapp.use( express.session({
164
164
localapp . use ( '/static' , express . static ( __dirname + '/static' ) ) ;
165
165
localapp . get ( '/' , function ( req , res ) {
166
166
util . log ( 'GET: /' ) ;
167
- res . redirect ( '/app/auth ' ) ;
167
+ res . redirect ( '/app/localauth ' ) ;
168
168
} ) ;
169
169
localapp . all ( / ^ \/ a p p \/ ( \w + ) \/ ( .* ) $ / , function ( req , res ) { apphandler ( req , res , __dirname + '/apps/' ) ; } ) ;
170
170
localapp . all ( / ^ \/ a p p \/ ( \w + ) \/ $ / , function ( req , res ) { apphandler ( req , res , __dirname + '/apps/' ) ; } ) ;
0 commit comments