Skip to content

Commit

Permalink
v0.2.4-muzamint.com domain
Browse files Browse the repository at this point in the history
  • Loading branch information
mingder78 committed Dec 16, 2023
1 parent 75147b4 commit ebb4a13
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 8 deletions.
Binary file modified bun.lockb
Binary file not shown.
Binary file modified example/bun.lockb
Binary file not shown.
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"typescript": "^5.0.0"
},
"dependencies": {
"@muzamint/erica-items-db": "latest"
"@muzamint/erica-items-db": "^0.2.4"
}
}
14 changes: 14 additions & 0 deletions example/vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"headers": [
{
"source": "/api/v1/chainlist/(.*)",
"headers": [
{ "key": "Access-Control-Allow-Credentials", "value": "true" },
{ "key": "Access-Control-Allow-Origin", "value": "*" },
{ "key": "Access-Control-Allow-Methods", "value": "GET" },
{ "key": "Access-Control-Allow-Headers", "value": "X-CSRF-Token, X-Requested-With, Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version" }
]
}
]
}

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@muzamint/erica-items-db",
"version": "0.2.1",
"version": "0.2.4",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"description": "",
Expand Down
8 changes: 2 additions & 6 deletions src/items/router/items.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// src/items/items.router.ts

import { cors } from '@elysiajs/cors'
import { swagger } from '@elysiajs/swagger'
//import { swagger } from '@elysiajs/swagger'

// interfaces

Expand All @@ -16,11 +16,7 @@ class CustomError extends Error {
}

export const router = new Elysia()
.use(swagger())
.use(cors({
origin: [/\*.muzamint.com$/, 'http://localhost:\*']
}))
// .use(cors()) // <-- add a specific IP and service, or use jwt/auth
.use(cors()) // <-- add a specific IP and service, or use jwt/auth
.onError(({ code, error }) => {
return new Response(error.toString())
})
Expand Down

0 comments on commit ebb4a13

Please sign in to comment.