I use middleware in my express API to test for auth0
const checkJwt = jwt({
secret: jwksRsa.expressJwtSecret({
cache: true,
rateLimit: true,
jwksRequestsPerMinute: 5,
jwksUri: `https://${process.env.AUTH0_DOMAIN}/.well-known/jwks.json`
}),
audience: process.env.AUTH0_AUDIENCE,
issuer: `https://${process.env.AUTH0_DOMAIN}/`,
algorithms: ['RS256']
});
...
server.use('/api', checkJwt, routes);
It works on my local dev machine, but when I run it during production, I get:
Error: getaddrinfo ENOTFOUND undefined undefined:443
at errnoException (dns.js:28:10)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:76:26)
I am running ubuntu 12 in production and mac on dev.
source
share