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

Related issues

Domiii picture Domiii  路  3Comments

AndrewEQ picture AndrewEQ  路  4Comments

extensionsapp picture extensionsapp  路  3Comments

haider0324 picture haider0324  路  3Comments

dmaks9 picture dmaks9  路  3Comments