Skip to content

Commit

Permalink
Use the app config for the secret.
Browse files Browse the repository at this point in the history
  • Loading branch information
lazyatom committed Dec 13, 2008
1 parent 3e44c1f commit 9a6ce83
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions config.ru
@@ -1,9 +1,10 @@
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), 'lib')
require 'vanilla'

app = Vanilla::App.new(ENV['VANILLA_CONFIG'])
use Rack::Session::Cookie, :key => 'vanilla.session',
:path => '/',
:expire_after => 2592000,
:secret => YAML.load(File.read(File.join(Vanilla::App.root,'config','secret.yml')))['secret']
:secret => app.config[:secret]
use Rack::Static, :urls => ["/public"], :root => File.join(File.dirname(__FILE__), *%w[vanilla])
run Vanilla::App.new(ENV['VANILLA_CONFIG'])
run app

0 comments on commit 9a6ce83

Please sign in to comment.