Skip to content

Commit cea6a43

Browse files
authored
Add CORS_ENABLED to Joi schemas (#1766)
* Add CORS_ENABLED to Joi schemas * Try updating docker compose
1 parent f30e953 commit cea6a43

File tree

5 files changed

+6
-2
lines changed

5 files changed

+6
-2
lines changed

.env.template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
API_URL=http://localhost:8003
22
BLOCK_EXPLORER_URL=http://localhost:3000
33
BLOCK_LOADER_TRANSACTION_TIMEOUT=5000
4+
CORS_ENABLED=true
45
DATABASE_CONNECTION_POOL_URL=postgres://postgres:password@localhost:5432/ironfish_api_development
56
DATABASE_URL=postgres://postgres:password@localhost:5432/ironfish_api_development
67
DATADOG_URL=127.0.0.1

.env.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
API_URL=http://localhost:8003
22
BLOCK_EXPLORER_URL=test
33
BLOCK_LOADER_TRANSACTION_TIMEOUT=5000
4+
CORS_ENABLED=true
45
DATABASE_CONNECTION_POOL_URL=postgres://postgres:password@localhost:5432/ironfish_api_test
56
DATABASE_URL=postgres://postgres:password@localhost:5432/ironfish_api_test
67
DATADOG_URL=127.0.0.1

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
"scripts": {
1717
"build": "tsc -b",
1818
"clean": "rm -rf ./build",
19-
"docker:start": "docker-compose up -d",
20-
"docker:stop": "docker-compose down",
19+
"docker:start": "docker compose up -d",
20+
"docker:stop": "docker compose down",
2121
"lint": "eslint .",
2222
"lint:fix": "eslint . --fix",
2323
"prestart": "bash bin/check_for_dotenv.sh",

src/app.module.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export const REST_MODULES = [
5252
API_URL: joi.string().required(),
5353
BLOCK_EXPLORER_URL: joi.string().required(),
5454
BLOCK_LOADER_TRANSACTION_TIMEOUT: joi.number().optional(),
55+
CORS_ENABLED: joi.boolean().default(true),
5556
DATABASE_CONNECTION_POOL_URL: joi.string().required(),
5657
DATABASE_URL: joi.string().required(),
5758
DATADOG_URL: joi.string().required(),

src/test/test-app.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export async function bootstrapTestApp(): Promise<INestApplication> {
2121
API_URL: joi.string().required(),
2222
BLOCK_EXPLORER_URL: joi.string().required(),
2323
BLOCK_LOADER_TRANSACTION_TIMEOUT: joi.number().optional(),
24+
CORS_ENABLED: joi.boolean().default(true),
2425
DATABASE_CONNECTION_POOL_URL: joi.string().required(),
2526
DATABASE_URL: joi.string().required(),
2627
DATADOG_URL: joi.string().required(),

0 commit comments

Comments
 (0)