sails-permissions
                                
                                 sails-permissions copied to clipboard
                                
                                    sails-permissions copied to clipboard
                            
                            
                            
                        Audit Policy error when using sockets.
Firstly it fails for the ip address which could be resolved by including req.socket.handshake.address.address but then it fails on the sanitizeRequestUrl function as req.get('host') causes the error has no method 'get' and req.originalUrl is undefined.
@scott-wyatt do you think your work on tjwebb/sails-auth#37 and tjwebb/sails-auth#38 might be relevant here?
@tjwebb not exactly as those only refer to the passport policy, more than likely there will need to be a handler for socket requests for the Audit Policy to inject what normally comes through a http request and is missing from a socket request. @dottodot, would you mind posting some sample code and a break down of what you are trying to do?
I just using https://github.com/oscarhaggerty/Backbone.Sails which defaults to using socket requests rather that ajax. So this is what causes the error. Changing the setting to just ajax request resolves the issue.
@dottodot, I work with a lot of socket requests as well, so I'll definitely be looking into this. If you find a solution please post.
I just submitted a PR that fixes these issues