Explorar el Código

Merge pull request #205 from pawelmalak/auth-header

Changed auth header
pawelmalak hace 3 años
padre
commit
e0f6034868
Se han modificado 2 ficheros con 2 adiciones y 2 borrados
  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 = () => {
 export const applyAuth = () => {
   const token = localStorage.getItem('token') || '';
   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 jwt = require('jsonwebtoken');
 
 
 const auth = (req, res, next) => {
 const auth = (req, res, next) => {
-  const authHeader = req.header('Authorization');
+  const authHeader = req.header('Authorization_Flame');
   let token;
   let token;
   let tokenIsValid = false;
   let tokenIsValid = false;