Skip to content

Instantly share code, notes, and snippets.

View Aylos9er's full-sized avatar

Jeremiah Aylos9er

View GitHub Profile
app.use(cors({
origin: process.env.ALLOWED_ORIGINS || '*',
methods: ['GET', 'POST', 'PUT', 'DELETE'],
allowedHeaders: ['Content-Type', 'Authorization'],
credentials: true,
maxAge: 86400 // 24 hours
}));
// Additional security measures
app.disable('x-powered-by');