mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 19:32:15 +00:00
fix(cli): include "auth-excluded" endpoints on the history middleware as well (#4028)
right now endpoints defined in `N8N_AUTH_EXCLUDE_ENDPOINTS` are skipping the JWT auth, and the history middleware is returning 404 on these urls. This change ensures that these endpoints skip all auth-related middlewares.
This commit is contained in:
committed by
GitHub
parent
287533e6c8
commit
d554128457
@@ -665,8 +665,16 @@ class App {
|
|||||||
rewrites: [
|
rewrites: [
|
||||||
{
|
{
|
||||||
from: new RegExp(
|
from: new RegExp(
|
||||||
// eslint-disable-next-line no-useless-escape
|
`^/(${[
|
||||||
`^\/(${this.restEndpoint}|healthz|metrics|css|js|${this.endpointWebhook}|${this.endpointWebhookTest})\/?.*$`,
|
'healthz',
|
||||||
|
'metrics',
|
||||||
|
'css',
|
||||||
|
'js',
|
||||||
|
this.restEndpoint,
|
||||||
|
this.endpointWebhook,
|
||||||
|
this.endpointWebhookTest,
|
||||||
|
...excludeEndpoints.split(':'),
|
||||||
|
].join('|')})/?.*$`,
|
||||||
),
|
),
|
||||||
to: (context) => {
|
to: (context) => {
|
||||||
return context.parsedUrl.pathname!.toString();
|
return context.parsedUrl.pathname!.toString();
|
||||||
|
|||||||
Reference in New Issue
Block a user