fix: Only apply supervisor api authentication after healthcheck entry

Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
This commit is contained in:
Cameron Diver 2019-01-29 13:51:12 +00:00
parent ec87d26be1
commit 707ddb5f45
No known key found for this signature in database
GPG Key ID: 49690ED87032539F

View File

@ -95,7 +95,6 @@ export class SupervisorAPI {
this.api.disable('x-powered-by');
this.api.use(expressLogger);
this.api.use(authenticate(this.config));
this.api.get('/v1/healthy', async (_req, res) => {
try {
@ -109,6 +108,8 @@ export class SupervisorAPI {
}
});
this.api.use(authenticate(this.config));
this.api.get('/ping', (_req, res) => res.send('OK'));
this.api.post('/v1/blink', (_req, res) => {