From 3d84668ba2c9b522ec61d53b84c5eca571ebf446 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivar=20Conradi=20=C3=98sthus?= Date: Thu, 9 Jun 2022 13:01:15 +0200 Subject: [PATCH] doc: proper api protection in google auth example. (#1688) fixes: #1679 --- website/docs/deploy/google-auth-hook.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/docs/deploy/google-auth-hook.md b/website/docs/deploy/google-auth-hook.md index f07b9be791..93492407bc 100644 --- a/website/docs/deploy/google-auth-hook.md +++ b/website/docs/deploy/google-auth-hook.md @@ -153,12 +153,12 @@ function googleAdminAuth(app, config, services) { } ``` -Implement a preRouter hook for `/api/admin`. +Implement a preRouter hook for `/api/`. ```js function googleAdminAuth(app, config, services) { // ... - app.use('/api/admin/', (req, res, next) => { + app.use('/api/', (req, res, next) => { if (req.user) { next(); } else { @@ -234,7 +234,7 @@ function googleAdminAuth(app, config, services) { }, ); - app.use('/api/admin/', (req, res, next) => { + app.use('/api/', (req, res, next) => { if (req.user) { next(); } else {