Skip to content

Commit 3f8117b

Browse files
authored
Update CORS to include the bridge website (#1771)
1 parent 2532b02 commit 3f8117b

File tree

7 files changed

+4
-25
lines changed

7 files changed

+4
-25
lines changed

.env.template

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
API_URL=http://localhost:8003
2-
BLOCK_EXPLORER_URL=http://localhost:3000
32
BLOCK_LOADER_TRANSACTION_TIMEOUT=5000
43
CHAINPORT_API_URL=https://preprod-api.chainport.io/
54
CHAINPORT_API_VERSION=2

.env.test

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
API_URL=http://localhost:8003
2-
BLOCK_EXPLORER_URL=test
32
BLOCK_LOADER_TRANSACTION_TIMEOUT=5000
43
CHAINPORT_API_URL=https://preprod-api.chainport.io/
54
CHAINPORT_API_VERSION=2

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ on:
1010

1111
env:
1212
API_URL: http://localhost:8003
13-
BLOCK_EXPLORER_URL: http://localhost:3000
1413
DATABASE_CONNECTION_POOL_URL: postgres://postgres:password@localhost:5432/ironfish_api_test
1514
DATABASE_URL: postgres://postgres:password@localhost:5432/ironfish_api_test
1615
DATADOG_URL: 127.0.0.1

README.md

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,7 @@
1414

1515
## Environment
1616

17-
You'll need a `.env` file with the following keys:
18-
19-
- `API_URL`
20-
- `BLOCK_EXPLORER_URL`
21-
- `DATABASE_CONNECTION_POOL_URL`
22-
- `DATABASE_URL`
23-
- `DATADOG_URL`
24-
- `INFLUXDB_API_TOKEN`
25-
- `INFLUXDB_BUCKET`
26-
- `INFLUXDB_ORG`
27-
- `INFLUXDB_URL`
28-
- `IRONFISH_API_KEY`
29-
- `NETWORK_VERSION`
30-
- `NODE_ENV`
31-
- `WORKER_COUNT`
32-
33-
You can copy `.env.template` to your own `.env` file
17+
You'll need a `.env` file including keys listed in `env.template`. We recommend copying `.env.template` to your own `.env` file.
3418

3519
## Running
3620

src/app.module.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ export const REST_MODULES = [
5252
isGlobal: true,
5353
validationSchema: joi.object({
5454
API_URL: joi.string().required(),
55-
BLOCK_EXPLORER_URL: joi.string().required(),
5655
BLOCK_LOADER_TRANSACTION_TIMEOUT: joi.number().optional(),
5756
CHAINPORT_API_URL: joi.string().required(),
5857
CHAINPORT_API_VERSION: joi.number().required(),

src/main.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ async function bootstrap(): Promise<void> {
3838
const config = app.get(ApiConfigService);
3939
const logger = app.get(LoggerService);
4040

41-
const defaultOrigins = [config.get<string>('BLOCK_EXPLORER_URL')];
41+
const defaultOrigins = [/ironfish.network$/];
4242
const enabledOrigins = config.isStaging()
4343
? [
4444
...defaultOrigins,
4545
/localhost/,
46-
/block-explorer.*\.vercel\.app/,
47-
/website-testnet.*\.vercel\.app/,
46+
/block-explorer.*ironfish\.vercel\.app$/,
47+
/oreowallet-bridge.*ironfish\.vercel\.app$/,
4848
]
4949
: defaultOrigins;
5050

src/test/test-app.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ export async function bootstrapTestApp(): Promise<INestApplication> {
1919
isGlobal: true,
2020
validationSchema: joi.object({
2121
API_URL: joi.string().required(),
22-
BLOCK_EXPLORER_URL: joi.string().required(),
2322
BLOCK_LOADER_TRANSACTION_TIMEOUT: joi.number().optional(),
2423
CHAINPORT_API_URL: joi.string().required(),
2524
CHAINPORT_API_VERSION: joi.number().required(),

0 commit comments

Comments
 (0)