mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 12:05:57 +01:00
allowGuestSearching config .. second attempt
This commit is contained in:
@@ -379,7 +379,7 @@ var path = require('path'),
|
||||
// Basic Routes (entirely client-side parsed, goal is to move the rest of the crap in this file into this one section)
|
||||
(function () {
|
||||
var routes = ['login', 'register', 'account', 'recent', '403', '404', '500'],
|
||||
loginRequired = ['unread', 'search', 'notifications'];
|
||||
loginRequired = ['unread', 'notifications'];
|
||||
|
||||
async.each(routes.concat(loginRequired), function(route, next) {
|
||||
app.get('/' + route, function (req, res) {
|
||||
@@ -741,7 +741,7 @@ var path = require('path'),
|
||||
});
|
||||
|
||||
app.get('/search/:term', function (req, res) {
|
||||
if (!req.user) {
|
||||
if (!req.user && !meta.config.allowGuestSearching) {
|
||||
return res.redirect('/403');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user