GT AI OS Community Edition v2.0.33
Security hardening release addressing CodeQL and Dependabot alerts: - Fix stack trace exposure in error responses - Add SSRF protection with DNS resolution checking - Implement proper URL hostname validation (replaces substring matching) - Add centralized path sanitization to prevent path traversal - Fix ReDoS vulnerability in email validation regex - Improve HTML sanitization in validation utilities - Fix capability wildcard matching in auth utilities - Update glob dependency to address CVE - Add CodeQL suppression comments for verified false positives 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
60
apps/control-panel-frontend/next.config.js
Normal file
60
apps/control-panel-frontend/next.config.js
Normal file
@@ -0,0 +1,60 @@
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
typescript: {
|
||||
// Skip type checking during build (types are checked in dev)
|
||||
ignoreBuildErrors: true
|
||||
},
|
||||
eslint: {
|
||||
// Skip ESLint during build
|
||||
ignoreDuringBuilds: true
|
||||
},
|
||||
compiler: {
|
||||
// Strip console.* calls in production builds (keep console.error for debugging)
|
||||
removeConsole: process.env.NODE_ENV === 'production' ? {
|
||||
exclude: ['error']
|
||||
} : false
|
||||
},
|
||||
// NOTE: Server-side environment variables (INTERNAL_API_URL, etc.) are NOT defined here
|
||||
// to prevent Next.js from inlining them at build time. They are read from process.env at
|
||||
// runtime, allowing Docker containers to inject the correct URLs via environment variables.
|
||||
// This enables flexible deployment without rebuilding when backend URLs change.
|
||||
|
||||
async rewrites() {
|
||||
// Use INTERNAL_API_URL for server-side requests (Docker networking)
|
||||
// Fall back to Docker hostname - this is evaluated at build time so localhost won't work
|
||||
const apiUrl = process.env.INTERNAL_API_URL || 'http://control-panel-backend:8000';
|
||||
|
||||
return [
|
||||
{
|
||||
source: '/api/v1/models',
|
||||
destination: `${apiUrl}/api/v1/models/`,
|
||||
},
|
||||
{
|
||||
source: '/api/v1/models/:path*',
|
||||
destination: `${apiUrl}/api/v1/models/:path*`,
|
||||
},
|
||||
{
|
||||
source: '/api/v1/tenants',
|
||||
destination: `${apiUrl}/api/v1/tenants/`,
|
||||
},
|
||||
{
|
||||
source: '/api/v1/users',
|
||||
destination: `${apiUrl}/api/v1/users/`,
|
||||
},
|
||||
{
|
||||
source: '/api/v1/resources',
|
||||
destination: `${apiUrl}/api/v1/resources/`,
|
||||
},
|
||||
{
|
||||
source: '/api/v1/system/:path*',
|
||||
destination: `${apiUrl}/api/v1/system/:path*`,
|
||||
},
|
||||
{
|
||||
source: '/api/:path*',
|
||||
destination: `${apiUrl}/api/:path*`,
|
||||
},
|
||||
];
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = nextConfig;
|
||||
Reference in New Issue
Block a user