I am looking to restrict a sub-set of routes to only respond to requests from localhost. Only way I can see to do this is by comparing all IPV4 and IPV6 possibilities for relevant routes but this looks and feels pretty untidy. I was wondering if anyone had any pearls of wisdom on how to do this as I'd prefer to not split my application into two different servers. BTW, I am running on a ARM7 platform and don't have the option of running NGINX.~C
--
You received this message because you are subscribed to the Google Groups "Express" group.
To unsubscribe from this group and stop receiving emails from it, send an email to express-js+...@googlegroups.com.
To post to this group, send email to expre...@googlegroups.com.
Visit this group at http://groups.google.com/group/express-js.
For more options, visit https://groups.google.com/d/optout.
--
You can stack middleware.app.get("/test", isLocal, isAuth, route)
It'd be cleaner to have the isLocal function just set a property on req and then have the isAuthorized function use that as part of its logic. Then everything can be done inline as proposed.
It'd be cleaner to have the isLocal function just set a property on req and then have the isAuthorized function use that as part of its logic. Then everything can be done inline as proposed.