mirror of
https://github.com/AeThex-Corporation/AeThex-OS.git
synced 2026-04-18 14:27:20 +00:00
Major Features: - Custom .aethex programming language with cross-platform compilation - Compiles to JavaScript, Lua (Roblox), Verse (UEFN), and C# (Unity) - Built-in COPPA compliance and PII detection for safe metaverse development Integration Points: 1. Terminal Integration - Added 'aethex' command for in-terminal compilation - Support for all compilation targets with --target flag - Real-time error reporting and syntax highlighting 2. IDE Integration - Native .aethex file support in Monaco editor - One-click compilation with target selector - Download compiled code functionality - Two example files: hello.aethex and auth.aethex 3. Curriculum Integration - New "AeThex Language" section in Foundry tech tree - Three modules: Realities & Journeys, Cross-Platform Sync, COPPA Compliance - Certification path for students 4. Documentation Site - Complete docs at /docs route (client/src/pages/aethex-docs.tsx) - Searchable documentation with sidebar navigation - Language guide, standard library reference, and examples - Ready for deployment to aethex.dev 5. npm Package Publishing - @aethex.os/core@1.0.0 - Standard library (published) - @aethex.os/cli@1.0.1 - Command line compiler (published) - Both packages live on npm and globally installable Domain Configuration: - DNS setup for 29+ domains (aethex.app, aethex.co, etc.) - nginx reverse proxy configuration - CORS configuration for cross-domain requests - OAuth redirect fixes for hash-based routing Standard Library Features: - Passport: Universal identity across platforms - DataSync: Cross-platform data synchronization - SafeInput: PII detection (phone, email, SSN, credit cards) - Compliance: COPPA/FERPA age gates and audit logging Documentation Package: - Created aethex-dev-docs.zip with complete documentation - Ready for static site deployment - Includes examples, API reference, and quickstart guide Technical Improvements: - Fixed OAuth blank page issue (hash routing) - Added .gitignore rules for temp files - Cleaned up build artifacts and temporary files - Updated all package references to @aethex.os namespace Co-Authored-By: Claude <noreply@anthropic.com>
74 lines
1.9 KiB
TypeScript
74 lines
1.9 KiB
TypeScript
import type { CorsOptions } from 'cors';
|
|
|
|
// All AeThex domains
|
|
const allowedOrigins = [
|
|
// Production domains
|
|
'https://aethex.app',
|
|
'https://aethex.co',
|
|
'https://aethex.network',
|
|
'https://aethex.net',
|
|
'https://aethex.tech',
|
|
'https://aethex.id',
|
|
'https://aethex.cloud',
|
|
'https://kernel.aethex.cloud',
|
|
'https://api.aethex.cloud',
|
|
'https://cdn.aethex.cloud',
|
|
'https://aethex.education',
|
|
'https://aethex.studio',
|
|
'https://aethex.shop',
|
|
'https://aethex.support',
|
|
'https://aethex.dev',
|
|
'https://aethex.info',
|
|
'https://aethex.blog',
|
|
'https://aethex.locker',
|
|
'https://aethex.bot',
|
|
'https://aethex.live',
|
|
'https://aethex.fun',
|
|
'https://aethex.space',
|
|
'https://aethex.bio',
|
|
'https://aethex.me',
|
|
'https://aethex.biz',
|
|
'https://aethex.pro',
|
|
'https://aethex.foundation',
|
|
'https://aethex.us',
|
|
'https://aethex.sbs',
|
|
'https://aethex.online',
|
|
'https://aethex.site',
|
|
// Development
|
|
'http://localhost:5173',
|
|
'http://localhost:5000',
|
|
'http://localhost:3000',
|
|
'http://127.0.0.1:5173',
|
|
'http://127.0.0.1:5000',
|
|
'http://127.0.0.1:3000',
|
|
];
|
|
|
|
export function getCorsOptions(): CorsOptions {
|
|
return {
|
|
origin: (origin, callback) => {
|
|
// Allow requests with no origin (mobile apps, Postman, curl, etc.)
|
|
if (!origin) {
|
|
return callback(null, true);
|
|
}
|
|
|
|
// Check if origin is in allowed list
|
|
if (allowedOrigins.includes(origin)) {
|
|
callback(null, true);
|
|
} else {
|
|
console.warn(`CORS blocked origin: ${origin}`);
|
|
callback(new Error(`Origin ${origin} not allowed by CORS`));
|
|
}
|
|
},
|
|
credentials: true,
|
|
methods: ['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'OPTIONS'],
|
|
allowedHeaders: [
|
|
'Content-Type',
|
|
'Authorization',
|
|
'X-Requested-With',
|
|
'Accept',
|
|
'Origin',
|
|
],
|
|
exposedHeaders: ['Set-Cookie'],
|
|
maxAge: 86400, // 24 hours
|
|
};
|
|
}
|