I'm trying to make a token double submit mechanism for my cherrypy website.
The client side rpc always includes a "_token" parameter in开发者_开发问答 request. I would prefer not to add "_token" as a parameter to every request handling function i write. I just want to check cherrypy.request.params["_token"] in an "on_start_resource" Tool i've added.
Have your on_start_resource Tool delete "_token" from the cherrypy.request.params dict when it's done with it. cf http://docs.python.org/library/stdtypes.html#dict.pop
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论