Skip to content

Commit 9ef2bab

Browse files
authored
feat: allow all origins to request config (cors) (#118)
* feat: allow all origins to request config * bump patch version
1 parent a66a02a commit 9ef2bab

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

package-testing/testing-api/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eppo-testing-api",
3-
"version": "1.1.1",
3+
"version": "1.1.2",
44
"description": "UFC server for SDK integration testing",
55
"main": "src/server.ts",
66
"repository": "github.com/Eppo-exp/sdk-test-data",
@@ -15,10 +15,12 @@
1515
"lint-fix": "eslint --fix"
1616
},
1717
"dependencies": {
18+
"cors": "^2.8.5",
1819
"dotenv": "^16.4.5",
1920
"express": "^4.20.0"
2021
},
2122
"devDependencies": {
23+
"@types/cors": "^2.8.17",
2224
"@types/express": "^4.17.21",
2325
"@types/node": "^22.5.1",
2426
"eslint": "^9.9.1",

package-testing/testing-api/src/app.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import * as path from 'path';
22

33
import express from 'express';
44
import routes from './routes';
5+
import cors from 'cors';
56

67
import * as fs from 'fs';
78
import { setDataFile } from './ufc/data';
@@ -17,6 +18,7 @@ class App {
1718
}
1819

1920
middlewares() {
21+
this.server.use(cors());
2022
this.server.use(express.json());
2123
}
2224

package-testing/testing-api/yarn.lock

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,13 @@
144144
dependencies:
145145
"@types/node" "*"
146146

147+
"@types/cors@^2.8.17":
148+
version "2.8.17"
149+
resolved "https://registry.yarnpkg.com/@types/cors/-/cors-2.8.17.tgz#5d718a5e494a8166f569d986794e49c48b216b2b"
150+
integrity sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA==
151+
dependencies:
152+
"@types/node" "*"
153+
147154
"@types/express-serve-static-core@^4.17.33":
148155
version "4.19.5"
149156
resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.19.5.tgz#218064e321126fcf9048d1ca25dd2465da55d9c6"
@@ -507,6 +514,14 @@ [email protected]:
507514
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.6.0.tgz#2798b04b071b0ecbff0dbb62a505a8efa4e19051"
508515
integrity sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==
509516

517+
cors@^2.8.5:
518+
version "2.8.5"
519+
resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29"
520+
integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==
521+
dependencies:
522+
object-assign "^4"
523+
vary "^1"
524+
510525
create-require@^1.1.0:
511526
version "1.1.1"
512527
resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333"
@@ -1227,6 +1242,11 @@ normalize-path@^3.0.0, normalize-path@~3.0.0:
12271242
resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"
12281243
integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==
12291244

1245+
object-assign@^4:
1246+
version "4.1.1"
1247+
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
1248+
integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==
1249+
12301250
object-inspect@^1.13.1:
12311251
version "1.13.2"
12321252
resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.2.tgz#dea0088467fb991e67af4058147a24824a3043ff"
@@ -1742,7 +1762,7 @@ v8-compile-cache-lib@^3.0.1:
17421762
resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf"
17431763
integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==
17441764

1745-
vary@~1.1.2:
1765+
vary@^1, vary@~1.1.2:
17461766
version "1.1.2"
17471767
resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
17481768
integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==

0 commit comments

Comments
 (0)