Skip to content

Instantly share code, notes, and snippets.

@ockham
Created June 6, 2016 20:06
Show Gist options
  • Save ockham/35e20d37441705c0069aebbf89721d3b to your computer and use it in GitHub Desktop.
Save ockham/35e20d37441705c0069aebbf89721d3b to your computer and use it in GitHub Desktop.
diff --git a/server/pages/index.js b/server/pages/index.js
index 4021343..1a88707 100644
--- a/server/pages/index.js
+++ b/server/pages/index.js
@@ -394,11 +394,9 @@ module.exports = function() {
app.get( '/mailing-lists/unsubscribe', setUpRoute, serverRender );
}
- if ( config.isEnabled( 'reader/discover' ) && config( 'env' ) !== 'development' ) {
- app.get( '/discover', function( req, res, next ) {
- if ( req.cookies.wordpress_logged_in ) {
- setUpLoggedInRoute( req, res, next );
- } else {
+ if ( config( 'env' ) !== 'development' ) {
+ app.get( '/discover', function( req, res ) {
+ if ( ! req.cookies.wordpress_logged_in ) {
res.redirect( config( 'discover_logged_out_redirect_url' ) );
}
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment