Scratch space for learning atproto app development

Remove CORS header tooling (it's overkill for this)

Changed files
-5
src
-2
package.json
···
"@atproto/syntax": "^0.3.0",
"@atproto/xrpc-server": "0.5.4-rc.0",
"better-sqlite3": "^11.1.2",
-
"cors": "^2.8.5",
"dotenv": "^16.4.5",
"envalid": "^8.0.0",
"express": "^4.19.2",
···
"devDependencies": {
"@atproto/lex-cli": "^0.4.1",
"@types/better-sqlite3": "^7.6.11",
-
"@types/cors": "^2.8.17",
"@types/express": "^4.17.21",
"pino-pretty": "^11.0.0",
"rimraf": "^5.0.0",
-1
src/env.ts
···
PUBLIC_URL: str({}),
DB_PATH: str({ devDefault: ':memory:' }),
COOKIE_SECRET: str({ devDefault: '00000000000000000000000000000000' }),
-
CORS_ORIGIN: str({ devDefault: testOnly('http://localhost:3000') }),
COMMON_RATE_LIMIT_MAX_REQUESTS: num({ devDefault: testOnly(1000) }),
COMMON_RATE_LIMIT_WINDOW_MS: num({ devDefault: testOnly(1000) }),
})
-2
src/server.ts
···
import events from 'node:events'
import type http from 'node:http'
-
import cors from 'cors'
import express, { type Express } from 'express'
import helmet from 'helmet'
import { pino } from 'pino'
···
// Middlewares
app.use(express.json())
app.use(express.urlencoded({ extended: true }))
-
app.use(cors({ origin: env.CORS_ORIGIN, credentials: true }))
app.use(
helmet({
contentSecurityPolicy: {