0

I'm passing from express to restify and I wrote a module to check my authorization that used express-session and before it worked well.

Now, on restify, the request.headers.authorization return undefined so my question is: can I add some code to tell to restify to fill this field?

Filippo1980
  • 2,745
  • 5
  • 30
  • 44
  • It should be `request.headers.authorization`. Do you know for sure that whatever client is calling your code actually supplies an authorization header? – HeadCode Oct 28 '16 at 00:34
  • @HeadCode : you are right! However, what do you mean? If do I know that all calls will arrive from smartphone, for example? If it is correct, so I would create the api most flexible as possible so the answer is no. – Filippo1980 Oct 28 '16 at 07:38
  • I have a doubt, who does fill the headers? My server api or client call? – Filippo1980 Oct 28 '16 at 08:11

1 Answers1

0

Ok, sorry for my illiteracy in autentication/authorization process! The problem was that I didn't send any headers on "authorization" request! Now it works without any new code.

Filippo1980
  • 2,745
  • 5
  • 30
  • 44