Authorising with Node, serving with Nginx
I expect this question has been answered, but because I'm unsure of the terminology I might have missed, or not understood the answer.
I would like to use Nodejs to authorise and parse a GET request, i.e:
Then once this is read by node, key authorised, and the files requested compiled, node would tell Nginx to serve back some static files based on this request.
- So, is this possible?
- Is there a better way of doing this (I have seen a lot about serving static files with Nginx instead of Nodejs)
edit - Just to inform, i'm using Express, routing is not my problem. Its just I don't know how to pass a successful request back to Nginx, or something like that
you could do token authentication. http://wiki.nginx.org/HttpSecureLinkModule
Your nodejs app could generate signed links, and nginx handles all aspects of serving the file.
There are several options with NodeJs: