unee-t / frontend

Meteor front end

Home Page:https://case.dev.unee-t.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

req.query.accessToken should be a req.headers.authorization check instead on POST

kaihendry opened this issue · comments

I was wondering why in https://github.com/unee-t/lambda2sns APIAccessToken was used as get parameters as well as a header -H "Authorization: Bearer XXXXX".

I removed the parameter assuming both ways would work & Iit didn't. I can see now there is no code to check req.headers.authorization in the POST request for example in

So be good to update the code to support Authorization for two reasons:

  • get auth parameters isn't the norm for POST
  • also helps not put credentials in my logs