chore(API): Add styling to credential callback and autoclose window (#12648)

This commit is contained in:
Dana
2025-01-21 15:21:42 +01:00
committed by GitHub
parent 223ad7d71a
commit fb4cb5afbb
5 changed files with 91 additions and 12 deletions

View File

@@ -7,6 +7,7 @@ import { readFile } from 'fs/promises';
import type { Server } from 'http';
import isbot from 'isbot';
import { Logger } from 'n8n-core';
import path from 'path';
import config from '@/config';
import { N8N_VERSION, TEMPLATES_DIR, inDevelopment, inTest } from '@/constants';
@@ -67,6 +68,9 @@ export abstract class AbstractServer {
this.app.set('view engine', 'handlebars');
this.app.set('views', TEMPLATES_DIR);
const assetsPath: string = path.join(__dirname, '../../../assets');
this.app.use(express.static(assetsPath));
const proxyHops = config.getEnv('proxy_hops');
if (proxyHops > 0) this.app.set('trust proxy', proxyHops);