mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
16 lines
445 B
TypeScript
16 lines
445 B
TypeScript
import type { RequestHandler } from 'express';
|
|
import Container from 'typedi';
|
|
import { License } from '../../License';
|
|
|
|
export function islogStreamingLicensed(): boolean {
|
|
return Container.get(License).isLogStreamingEnabled();
|
|
}
|
|
|
|
export const logStreamingLicensedMiddleware: RequestHandler = (req, res, next) => {
|
|
if (islogStreamingLicensed()) {
|
|
next();
|
|
} else {
|
|
res.status(403).json({ status: 'error', message: 'Unauthorized' });
|
|
}
|
|
};
|