mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-31 00:16:47 +01:00
Update client-auth-unleash.js
This commit is contained in:
parent
570bdd9f90
commit
c580a50e8f
@ -12,10 +12,10 @@ unleash
|
||||
enableLegacyRoutes: false,
|
||||
preRouterHook: app => {
|
||||
app.use('/api/client', (req, res, next) => {
|
||||
if (req.header('authorization') !== sharedSecret) {
|
||||
res.sendStatus(401);
|
||||
} else {
|
||||
if (req.header('authorization') === sharedSecret) {
|
||||
next();
|
||||
} else {
|
||||
res.sendStatus(401);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user