mirror of
https://github.com/stolksdorf/homebrewery.git
synced 2025-12-13 03:25:56 +00:00
Adding in env configs and aextra protection on dev routes
This commit is contained in:
4
config/production.json
Normal file
4
config/production.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"login_path" : "http://naturalcrit.com/login",
|
||||
"log_level" : "warn"
|
||||
}
|
||||
4
config/staging.json
Normal file
4
config/staging.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"login_path" : "http://staging.naturalcrit.com/login",
|
||||
"log_level" : "trace"
|
||||
}
|
||||
@@ -3,6 +3,8 @@ const jwt = require('jwt-simple');
|
||||
const auth = require('basic-auth');
|
||||
const config = require('nconf');
|
||||
|
||||
if(process.env.NODE_ENV == 'production') throw 'Loading dev routes in prod. ABORT ABORT';
|
||||
|
||||
|
||||
router.get('/dev/login', (req, res, next) => {
|
||||
const user = req.query.user;
|
||||
|
||||
Reference in New Issue
Block a user