the statusphere demo reworked into a vite/react app in a monorepo

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

-5
-2
package.json
··· 22 "@atproto/syntax": "^0.3.0", 23 "@atproto/xrpc-server": "0.5.4-rc.0", 24 "better-sqlite3": "^11.1.2", 25 - "cors": "^2.8.5", 26 "dotenv": "^16.4.5", 27 "envalid": "^8.0.0", 28 "express": "^4.19.2", ··· 39 "devDependencies": { 40 "@atproto/lex-cli": "^0.4.1", 41 "@types/better-sqlite3": "^7.6.11", 42 - "@types/cors": "^2.8.17", 43 "@types/express": "^4.17.21", 44 "pino-pretty": "^11.0.0", 45 "rimraf": "^5.0.0",
··· 22 "@atproto/syntax": "^0.3.0", 23 "@atproto/xrpc-server": "0.5.4-rc.0", 24 "better-sqlite3": "^11.1.2", 25 "dotenv": "^16.4.5", 26 "envalid": "^8.0.0", 27 "express": "^4.19.2", ··· 38 "devDependencies": { 39 "@atproto/lex-cli": "^0.4.1", 40 "@types/better-sqlite3": "^7.6.11", 41 "@types/express": "^4.17.21", 42 "pino-pretty": "^11.0.0", 43 "rimraf": "^5.0.0",
-1
src/env.ts
··· 13 PUBLIC_URL: str({}), 14 DB_PATH: str({ devDefault: ':memory:' }), 15 COOKIE_SECRET: str({ devDefault: '00000000000000000000000000000000' }), 16 - CORS_ORIGIN: str({ devDefault: testOnly('http://localhost:3000') }), 17 COMMON_RATE_LIMIT_MAX_REQUESTS: num({ devDefault: testOnly(1000) }), 18 COMMON_RATE_LIMIT_WINDOW_MS: num({ devDefault: testOnly(1000) }), 19 })
··· 13 PUBLIC_URL: str({}), 14 DB_PATH: str({ devDefault: ':memory:' }), 15 COOKIE_SECRET: str({ devDefault: '00000000000000000000000000000000' }), 16 COMMON_RATE_LIMIT_MAX_REQUESTS: num({ devDefault: testOnly(1000) }), 17 COMMON_RATE_LIMIT_WINDOW_MS: num({ devDefault: testOnly(1000) }), 18 })
-2
src/server.ts
··· 1 import events from 'node:events' 2 import type http from 'node:http' 3 - import cors from 'cors' 4 import express, { type Express } from 'express' 5 import helmet from 'helmet' 6 import { pino } from 'pino' ··· 51 // Middlewares 52 app.use(express.json()) 53 app.use(express.urlencoded({ extended: true })) 54 - app.use(cors({ origin: env.CORS_ORIGIN, credentials: true })) 55 app.use( 56 helmet({ 57 contentSecurityPolicy: {
··· 1 import events from 'node:events' 2 import type http from 'node:http' 3 import express, { type Express } from 'express' 4 import helmet from 'helmet' 5 import { pino } from 'pino' ··· 50 // Middlewares 51 app.use(express.json()) 52 app.use(express.urlencoded({ extended: true })) 53 app.use( 54 helmet({ 55 contentSecurityPolicy: {