aboutsummaryrefslogtreecommitdiffstats
path: root/src/app.coffee
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2014-08-08 11:19:11 -0700
committerAdam Soltys <[email protected]>2014-08-08 11:33:24 -0700
commit6d5c3a56067b96bb5d97cca4a80bacbf78395b2c (patch)
treef7b4b8d7aed2fec54b16f7294cfaff2867e33557 /src/app.coffee
parent163f681ff6d4d4eb2b111a6cdfa0e0133f6840ad (diff)
downloadcoinos-server-6d5c3a56067b96bb5d97cca4a80bacbf78395b2c.tar.gz
coinos-server-6d5c3a56067b96bb5d97cca4a80bacbf78395b2c.zip
Move session secret into unversioned config file
Diffstat (limited to 'src/app.coffee')
-rw-r--r--src/app.coffee7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/app.coffee b/src/app.coffee
index 94e0e4b3..538dfa05 100644
--- a/src/app.coffee
+++ b/src/app.coffee
@@ -3,6 +3,7 @@ bodyParser = require('body-parser')
cookieParser = require('cookie-parser')
path = require('path')
passport = require('./passport')
+config = require('./config')
calculator = require("./routes/calculator")
sessions = require("./routes/sessions")(passport)
@@ -23,8 +24,8 @@ app.use(express.static(__dirname + '/public'))
app.use(bodyParser.urlencoded({ extended: true}))
app.use(bodyParser.json())
app.use(bodyParser.json({ type: 'application/vnd.api+json' }))
-app.use(cookieParser('weareallmadeofstars'))
-app.use(session(resave: true, saveUninitialized: true, secret: 'weareallmadeofstars', store: sessionStore, cookie: { maxAge: 1209600000 }, key: 'vanbtc.sid'))
+app.use(cookieParser(config.secret))
+app.use(session(resave: true, saveUninitialized: true, secret: config.secret, store: sessionStore, cookie: { maxAge: 1209600000 }, key: 'vanbtc.sid'))
app.use(passport.initialize())
app.use(passport.session())
@@ -53,8 +54,8 @@ app.get('/:user/transactions.json', authorize, transactions.json)
app.post('/:user/transactions', authorize, transactions.create)
app.get('/:user/report', authorize, transactions.index)
-app.get('/:user', authorize, users.show)
app.get('/:user.json', authorize, users.json)
+app.get('/:user', authorize, users.show)
app.use(require('connect-assets')(src: 'public', servePath: '/'))