1
0
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:
Ivar Conradi Østhus 2018-07-21 09:52:53 +02:00
parent 570bdd9f90
commit c580a50e8f

View File

@ -12,10 +12,10 @@ unleash
enableLegacyRoutes: false, enableLegacyRoutes: false,
preRouterHook: app => { preRouterHook: app => {
app.use('/api/client', (req, res, next) => { app.use('/api/client', (req, res, next) => {
if (req.header('authorization') !== sharedSecret) { if (req.header('authorization') === sharedSecret) {
res.sendStatus(401);
} else {
next(); next();
} else {
res.sendStatus(401);
} }
}); });
}, },