We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent da6c92b commit fe11126Copy full SHA for fe11126
2 files changed
apps/api/package.json
@@ -29,6 +29,7 @@
29
"dependencies": {
30
"@codeimage/prisma-models": "workspace:*",
31
"@fastify/autoload": "^5.2.0",
32
+ "@fastify/cors": "8.1.0",
33
"@fastify/env": "^4.1.0",
34
"@fastify/jwt": "6.3.2",
35
"@fastify/sensible": "^5.1.0",
apps/api/src/server.ts
@@ -1,4 +1,5 @@
1
// Read the .env file.
2
+import fastifyCors from '@fastify/cors';
3
// Require library to exit fastify process, gracefully (if possible)
4
import * as closeWithGrace from 'close-with-grace';
5
import * as dotenv from 'dotenv';
@@ -12,6 +13,10 @@ const app = Fastify({
12
13
logger: true,
14
});
15
16
+app.register(fastifyCors, {
17
+ // TODO: fix
18
+ origin: '*',
19
+});
20
// Register your application as a normal plugin.
21
app.register(import('./app'));
22
0 commit comments