diff --git a/README.md b/README.md index 2beb3b5..152915b 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ puma -C app/config/puma.rb Pull the latest image: ```bash -docker pull chrisvel/tududi:0.19 +docker pull chrisvel/tududi:0.20 ``` In order to start the docker container you need 3 enviromental variables: @@ -120,7 +120,7 @@ TUDUDI_INTERNAL_SSL_ENABLED -e TUDUDI_INTERNAL_SSL_ENABLED=false \ -v ~/tududi_db:/usr/src/app/tududi_db \ -p 9292:9292 \ - -d chrisvel/tududi:0.19 + -d chrisvel/tududi:0.20 ``` 3. Navigate to https://localhost:9292 and fill in your email and password. diff --git a/app.rb b/app.rb index 9c1adb5..05811ae 100644 --- a/app.rb +++ b/app.rb @@ -29,7 +29,8 @@ set :public_folder, 'public' configure do enable :sessions - set :sessions, httponly: true, secure: production?, expire_after: 2_592_000 + set :sessions, httponly: true, secure: (production? && ENV['TUDUDI_INTERNAL_SSL_ENABLED'] == 'true'), + expire_after: 2_592_000 set :session_secret, ENV.fetch('TUDUDI_SESSION_SECRET') { SecureRandom.hex(64) } # Auto-create user if not exists