Skip to content

Commit

Permalink
Merge pull request #5 from RyuGames/auth-header
Browse files Browse the repository at this point in the history
Add support for auth in headers
  • Loading branch information
nickfujita authored Dec 5, 2022
2 parents b4e2c24 + 942fdc1 commit 116d549
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/api/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ function handleHTTP(globalArgs, req, res, next, callback, isPost) {
const providedArgsCount = providedArgs.length;
for (let i = 0; i < providedArgsCount; i += 1) {
const providedArg = providedArgs[i];
const value = (isPost ? req.body : req.query)[providedArg.name];
const argValues = { ...req.headers, ...(isPost ? req.body : req.query) };
const value = argValues[providedArg.name] || argValues[providedArg.name.toLowerCase()];
if (value != null) {
let validType = null;

Expand Down

0 comments on commit 116d549

Please sign in to comment.