We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent baa973c commit ec829feCopy full SHA for ec829fe
templates/express/routes.js
@@ -23,6 +23,11 @@ module.exports = function(app) {
23
app.post('/api/session', session.login);
24
app.del('/api/session', session.logout);<% } %>
25
26
+ // All undefined api routes should return a 404
27
+ app.get('/api/*', function(req, res) {
28
+ res.send(404);
29
+ });
30
+
31
// All other routes to use Angular routing in app/scripts/app.js
32
app.get('/partials/*', index.partials);
33
app.get('/*',<% if(mongoPassportUser) { %> middleware.setUserCookie,<% } %> index.index);
0 commit comments