Skip to content

Commit 0bbf68f

Browse files
committed
cors
1 parent 8cf946b commit 0bbf68f

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

bun.lock

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@
88
"@wormhole-foundation/sdk-base": "^2.4.0",
99
"@wormhole-foundation/sdk-definitions": "^2.4.0",
1010
"binary-layout": "^1.3.0",
11+
"cors": "^2.8.5",
1112
"express": "^5.1.0",
1213
"viem": "^2.31.7",
1314
},
1415
"devDependencies": {
1516
"@types/bun": "latest",
17+
"@types/cors": "^2.8.17",
1618
},
1719
"peerDependencies": {
1820
"typescript": "^5",
@@ -40,6 +42,8 @@
4042

4143
"@types/connect": ["@types/[email protected]", "", { "dependencies": { "@types/node": "*" } }, "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug=="],
4244

45+
"@types/cors": ["@types/[email protected]", "", { "dependencies": { "@types/node": "*" } }, "sha512-mFNylyeyqN93lfe/9CSxOGREz8cpzAhH+E93xJ4xWQf62V8sQ/24reV2nyzUWM6H6Xji+GGHpkbLe7pVoUEskg=="],
46+
4347
"@types/express": ["@types/[email protected]", "", { "dependencies": { "@types/body-parser": "*", "@types/express-serve-static-core": "^5.0.0", "@types/serve-static": "*" } }, "sha512-wGA0NX93b19/dZC1J18tKWVIYWyyF2ZjT9vin/NRu0qzzvfVzWjs04iq2rQ3H65vCTQYlRqs3YHfY7zjdV+9Kw=="],
4448

4549
"@types/express-serve-static-core": ["@types/[email protected]", "", { "dependencies": { "@types/node": "*", "@types/qs": "*", "@types/range-parser": "*", "@types/send": "*" } }, "sha512-R+33OsgWw7rOhD1emjU7dzCDHucJrgJXMA5PYCzJxVil0dsyx5iBEPHqpPfiKNJQb7lZ1vxwoLR4Z87bBUpeGQ=="],
@@ -88,6 +92,8 @@
8892

8993
"cookie-signature": ["[email protected]", "", {}, "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg=="],
9094

95+
"cors": ["[email protected]", "", { "dependencies": { "object-assign": "^4", "vary": "^1" } }, "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g=="],
96+
9197
"csstype": ["[email protected]", "", {}, "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw=="],
9298

9399
"debug": ["[email protected]", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ=="],
@@ -158,6 +164,8 @@
158164

159165
"negotiator": ["[email protected]", "", {}, "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg=="],
160166

167+
"object-assign": ["[email protected]", "", {}, "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg=="],
168+
161169
"object-inspect": ["[email protected]", "", {}, "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew=="],
162170

163171
"on-finished": ["[email protected]", "", { "dependencies": { "ee-first": "1.1.1" } }, "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg=="],

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"type": "module",
55
"private": true,
66
"devDependencies": {
7-
"@types/bun": "latest"
7+
"@types/bun": "latest",
8+
"@types/cors": "^2.8.17"
89
},
910
"peerDependencies": {
1011
"typescript": "^5"
@@ -17,6 +18,7 @@
1718
"@wormhole-foundation/sdk-base": "^2.4.0",
1819
"@wormhole-foundation/sdk-definitions": "^2.4.0",
1920
"binary-layout": "^1.3.0",
21+
"cors": "^2.8.5",
2022
"express": "^5.1.0",
2123
"viem": "^2.31.7"
2224
}

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import express from "express";
2+
import cors from "cors";
23
import { overrideGuardianSet } from "./overrideGuardianSet";
34
import { quoteHandler, statusHandler, capabilitiesHandler } from "./api";
45

@@ -19,6 +20,7 @@ await overrideGuardianSet(
1920

2021
const app = express();
2122

23+
app.use(cors());
2224
app.use(express.json());
2325
app.post("/v0/quote", quoteHandler);
2426
app.post("/v0/status/tx", statusHandler);

0 commit comments

Comments
 (0)