diff --git a/.gitignore b/.gitignore index 6f92a01..5f24675 100644 --- a/.gitignore +++ b/.gitignore @@ -116,3 +116,5 @@ dist .yarn/install-state.gz .pnp.* +# cors file +allowed_cors.js \ No newline at end of file diff --git a/README.md b/README.md index 71e61bc..544b7a3 100644 --- a/README.md +++ b/README.md @@ -8,4 +8,12 @@ configure environment variables with .env file PORT= DATABASE_URL="" -DATABASE_NAME="" \ No newline at end of file +DATABASE_NAME="" + + +allowed_cors.js: + +module.exports = [ + "cors_domain_1", + "cors_domain_2" +] \ No newline at end of file diff --git a/config.js b/config.js index 01b4ccb..1e74497 100644 --- a/config.js +++ b/config.js @@ -5,15 +5,7 @@ module.exports = { database_url: process.env.DATABASE_URL, database_name: process.env.DATABASE_NAME, log_path: "./logs/runtime.log", - allowed_cors: [ - "http://192.168.1.171:3000", - "http://localhost:3000", - "https://stream.graff.tech/", - "http://212.220.216.185:3005", - "https://stream.graff.tech", - "http://test.stream.graff.tech", - "https://test.stream.graff.tech" - ], + allowed_cors: require('./allowed_cors'), limiter: { window_minutes: 10, max_requests_per_window: 1000