mirror of
https://github.com/pawelmalak/flame.git
synced 2026-02-28 01:13:11 +08:00
Changed auth header
This commit is contained in:
@@ -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,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;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user