Open admwx7 opened 10 years ago
Why not do the cleaning up in server.py itself? Right now it's forwarding all requests and responses to the required parties, so I believe it'd be a good position to place any code that manipulates headers or content. API version should definitely be checked.
Server.py is a fine place to take care of this, doesn't really matter where to me, just has to get done.
Create a module that is the only publicly accessible call on the server, it will have to take a header request, parse it for bad data / attacks, pull out information then pass the request on to the modules on the system that will handle all of the actual computations. This module will also be the point that checks the API version that's sent from the client to determine where the request will be sent on the server.