cors moved from config.js to allowed_cors.js, allowed_cors.js added to gitignore, allowed_cors.js added to README.md

This commit is contained in:
C
2023-02-28 14:23:02 +05:00
parent e3264f5e02
commit 654907f1de
3 changed files with 12 additions and 10 deletions
+2
View File
@@ -116,3 +116,5 @@ dist
.yarn/install-state.gz
.pnp.*
# cors file
allowed_cors.js
+9 -1
View File
@@ -8,4 +8,12 @@ configure environment variables with .env file
PORT=
DATABASE_URL=""
DATABASE_NAME=""
DATABASE_NAME=""
allowed_cors.js:
module.exports = [
"cors_domain_1",
"cors_domain_2"
]
+1 -9
View File
@@ -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