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:

something.com/app/?key=12345&files=all

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

Answers


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:


Need Your Help

jQuery is not working in AJAX loaded div

php jquery html ajax

This is my slider.php page in which content of ajax.php file is loaded through ajax.

Send particular variable to a function

php codeigniter

Is there a way to send only the variable you want to a function?

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.