Skip to content

Instantly share code, notes, and snippets.

View jarylc's full-sized avatar
🇸🇬
https://gitlab.com/jarylc | https://jarylchng.com

Jaryl Chng jarylc

🇸🇬
https://gitlab.com/jarylc | https://jarylchng.com
View GitHub Profile
const { dirname, resolve } = require('path')
const Layer = require('express/lib/router/layer')
const { issueCookie } = require(resolve(dirname(require.resolve('n8n')), 'auth/jwt'))
const ignoreAuthRegexp = /^\/(assets|healthz|webhook|rest\/oauth2-credential)/
module.exports = {
n8n: {
ready: [
async function ({ app }, config) {
const { stack } = app._router
const index = stack.findIndex((l) => l.name === 'cookieParser')