decentralised sync engine
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: cors smiley face

serenity e5699e35 cb60fa57

+17
+1
package.json
··· 27 27 "@atcute/crypto": "^2.2.5", 28 28 "@atcute/identity-resolver": "^1.1.4", 29 29 "@atcute/xrpc-server": "^0.1.2", 30 + "@fastify/cors": "^11.1.0", 30 31 "@fastify/websocket": "^11.2.0", 31 32 "dotenv": "^17.2.3", 32 33 "fastify": "^5.6.1",
+11
pnpm-lock.yaml
··· 17 17 '@atcute/xrpc-server': 18 18 specifier: ^0.1.2 19 19 version: 0.1.2 20 + '@fastify/cors': 21 + specifier: ^11.1.0 22 + version: 11.1.0 20 23 '@fastify/websocket': 21 24 specifier: ^11.2.0 22 25 version: 11.2.0 ··· 295 298 296 299 '@fastify/ajv-compiler@4.0.5': 297 300 resolution: {integrity: sha512-KoWKW+MhvfTRWL4qrhUwAAZoaChluo0m0vbiJlGMt2GXvL4LVPQEjt8kSpHI3IBq5Rez8fg+XeH3cneztq+C7A==} 301 + 302 + '@fastify/cors@11.1.0': 303 + resolution: {integrity: sha512-sUw8ed8wP2SouWZTIbA7V2OQtMNpLj2W6qJOYhNdcmINTu6gsxVYXjQiM9mdi8UUDlcoDDJ/W2syPo1WB2QjYA==} 298 304 299 305 '@fastify/error@4.2.0': 300 306 resolution: {integrity: sha512-RSo3sVDXfHskiBZKBPRgnQTtIqpi/7zhJOEmAxCiBcM7d0uwdGdxLlsCaLzGs8v8NnxIRlfG0N51p5yFaOentQ==} ··· 1188 1194 ajv: 8.17.1 1189 1195 ajv-formats: 3.0.1(ajv@8.17.1) 1190 1196 fast-uri: 3.1.0 1197 + 1198 + '@fastify/cors@11.1.0': 1199 + dependencies: 1200 + fastify-plugin: 5.1.0 1201 + toad-cache: 3.7.0 1191 1202 1192 1203 '@fastify/error@4.2.0': {} 1193 1204
+5
src/server/index.ts
··· 1 1 import websocket from "@fastify/websocket"; 2 + import cors from "@fastify/cors"; 2 3 import Fastify from "fastify"; 3 4 4 5 export const setupServer = async () => { 5 6 const fastify = Fastify({ 6 7 logger: true, 8 + }); 9 + 10 + await fastify.register(cors, { 11 + origin: true, 7 12 }); 8 13 9 14 await fastify.register(websocket);