Skip to content

Commit c59ed98

Browse files
committed
feat: add CORS plugin
1 parent 012be38 commit c59ed98

3 files changed

Lines changed: 7 additions & 0 deletions

File tree

bun.lock

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"typescript": "5"
1212
},
1313
"dependencies": {
14+
"@elysiajs/cors": "^1.4.1",
1415
"elysia": "1",
1516
"fast-xml-parser": "^5.3.3"
1617
}

src/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
import { Elysia, t } from 'elysia';
2+
import { cors } from '@elysiajs/cors'
23
import { XMLParser } from 'fast-xml-parser';
34

45
const app = new Elysia()
56

7+
app.use(cors());
8+
69
interface RSSItem {
710
title: string;
811
link: string;

0 commit comments

Comments
 (0)