Przeglądaj źródła

Changed auth header

Paweł Malak 3 lat temu
rodzic
commit
e13f6f2612
2 zmienionych plików z 2 dodań i 2 usunięć
  1. 1 1
      client/src/utility/applyAuth.ts
  2. 1 1
      middleware/auth.js

+ 1 - 1
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}` };
 };

+ 1 - 1
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;