Fix Authenticate API Requests Example

Signed-off-by: hillmandj <hillmandj@gmail.com>
This commit is contained in:
hillmandj
2022-10-24 12:46:36 -04:00
parent 9124416926
commit 5938d1244d
@@ -75,7 +75,7 @@ export const createAuthMiddleware = async (
// Authorization header may be forwarded by plugin requests
req.headers.authorization = `Bearer ${token}`;
}
if (token && token !== req.cookies.token) {
if (token && token !== req.cookies?.token) {
setTokenCookie(res, {
token,
secure,