cors added, config tests fixed
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
const {test_config} = require('./tests/config')
|
||||||
|
|
||||||
|
if (!test_config()) {
|
||||||
|
process.exit(1)
|
||||||
|
}
|
||||||
|
console.log('all initial tests successfully passed')
|
||||||
|
|
||||||
const {port} = require('./config')
|
const {port} = require('./config')
|
||||||
const app = require('express')()
|
const app = require('express')()
|
||||||
const helmet = require('helmet')
|
const helmet = require('helmet')
|
||||||
@@ -8,13 +15,6 @@ const {request_logger, error_logger} = require('./src/middlewares/logger')
|
|||||||
const {options, cors} = require('./src/middlewares/cors')
|
const {options, cors} = require('./src/middlewares/cors')
|
||||||
const {error_handler} = require('./src/middlewares/error_handler')
|
const {error_handler} = require('./src/middlewares/error_handler')
|
||||||
//const limiter = require('./src/middlewares/limiter')
|
//const limiter = require('./src/middlewares/limiter')
|
||||||
const {test_config} = require('./tests/config')
|
|
||||||
|
|
||||||
if (!test_config()) {
|
|
||||||
process.exit(1)
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log('all initial tests successfully passed')
|
|
||||||
|
|
||||||
app.options(options)
|
app.options(options)
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,9 @@ module.exports = {
|
|||||||
"http://localhost:3000",
|
"http://localhost:3000",
|
||||||
"https://stream.graff.tech/",
|
"https://stream.graff.tech/",
|
||||||
"http://212.220.216.185:3005",
|
"http://212.220.216.185:3005",
|
||||||
"https://stream.graff.tech"
|
"https://stream.graff.tech",
|
||||||
|
"http://test.stream.graff.tech",
|
||||||
|
"https://test.stream.graff.tech"
|
||||||
],
|
],
|
||||||
limiter: {
|
limiter: {
|
||||||
window_minutes: 10,
|
window_minutes: 10,
|
||||||
|
|||||||
Reference in New Issue
Block a user