feat: SolaceNet gateway rails, IRU marketplace hardening, and docs
- Gateway adapter registry, rails routes, optional SOLACENET_GATEWAY_RAILS_ENFORCE; HTTP integration tests. - IRU marketplace: rate limits, public routes, notifications/SMTP env docs; marketplace UI constants and flows. - Quantum proxy legacy protocol types; debank/tezos/GSDS touch-ups; .env.example operator notes. - SolaceNet doc set (gaps, runbooks, telecom schema example). Tests: npm run test:iru-marketplace, npm run test:gateway (pass). Note: full-repo tsc still reports unrelated legacy errors outside this change set. Made-with: Cursor
This commit is contained in:
@@ -147,6 +147,11 @@ import ilcRoutes from '@/core/ledger/ilc/ilc.routes';
|
||||
|
||||
const app: Express = express();
|
||||
|
||||
// Behind NPM / load balancer: set TRUST_PROXY=1 so rate limits and req.ip use the client address
|
||||
if (process.env.TRUST_PROXY === '1' || process.env.TRUST_PROXY === 'true') {
|
||||
app.set('trust proxy', 1);
|
||||
}
|
||||
|
||||
// Security middleware
|
||||
app.use(helmet());
|
||||
|
||||
@@ -220,8 +225,19 @@ const swaggerOptions = {
|
||||
const swaggerSpec = swaggerJsdoc(swaggerOptions);
|
||||
app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerSpec));
|
||||
|
||||
// Health check endpoint (no auth required)
|
||||
app.get('/health', async (req, res) => {
|
||||
// Top-level service metadata so API hostnames return a clean 200 at "/".
|
||||
app.get('/', (req, res) => {
|
||||
res.status(200).json({
|
||||
service: 'dbis-core-banking-system',
|
||||
status: 'healthy',
|
||||
version: '1.0.0',
|
||||
docs: '/api-docs',
|
||||
health: '/health',
|
||||
});
|
||||
});
|
||||
|
||||
// Health check endpoints (no auth required)
|
||||
app.get(['/health', '/v1/health'], async (req, res) => {
|
||||
const healthStatus: {
|
||||
status: string;
|
||||
timestamp: string;
|
||||
@@ -478,4 +494,3 @@ app.use('/', metricsRoutes);
|
||||
app.use(errorHandler);
|
||||
|
||||
export default app;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user