From e13f6f261200811837c213179eb90cd34adb087f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Malak?= Date: Fri, 19 Nov 2021 12:41:32 +0100 Subject: [PATCH] Changed auth header --- client/src/utility/applyAuth.ts | 2 +- middleware/auth.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/utility/applyAuth.ts b/client/src/utility/applyAuth.ts index 95dcfb2..cf79efe 100644 --- a/client/src/utility/applyAuth.ts +++ b/client/src/utility/applyAuth.ts @@ -1,4 +1,4 @@ export const applyAuth = () => { const token = localStorage.getItem('token') || ''; - return { Authorization: `Bearer ${token}` }; + return { Authorization_Flame: `Bearer ${token}` }; }; diff --git a/middleware/auth.js b/middleware/auth.js index c73d0ca..137c78d 100644 --- a/middleware/auth.js +++ b/middleware/auth.js @@ -1,7 +1,7 @@ const jwt = require('jsonwebtoken'); const auth = (req, res, next) => { - const authHeader = req.header('Authorization'); + const authHeader = req.header('Authorization_Flame'); let token; let tokenIsValid = false;