Express: Access to req.header in the 'before save' callbacks

Created on 18 Aug 2016  路  2Comments  路  Source: expressjs/express

How can get access to req.header in the 'before save' callbacks?

Code

CofeeShop.observe('before save', function(ctx,next){
ctx.req.headers['key'] ; // I want to do something like this.. this works in express but not in strongloop
//
//
});

In case this is not possible how can I override the

invalid

Most helpful comment

@abhay8nitt I think you have the wrong repo, and I can't really infer your question from your post. Are you sure you have the right repo? It looks like you might want to make the issue in StrongLoop instead.

All 2 comments

@abhay8nitt I think you have the wrong repo, and I can't really infer your question from your post. Are you sure you have the right repo? It looks like you might want to make the issue in StrongLoop instead.

@abhay8nitt the correct repo to open the issue is at https://github.com/strongloop/loopback.

Was this page helpful?
0 / 5 - 0 ratings