mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 01:32:36 +02:00
fortify cookie security - samesite, secure, explicit httponly
This commit is contained in:
parent
d12dc53631
commit
57e31c66e3
1 changed files with 4 additions and 1 deletions
5
app.rb
5
app.rb
|
@ -4,7 +4,10 @@ require './app_helpers.rb'
|
||||||
use Rack::Session::Cookie, key: 'neocities',
|
use Rack::Session::Cookie, key: 'neocities',
|
||||||
path: '/',
|
path: '/',
|
||||||
expire_after: 31556926, # one year in seconds
|
expire_after: 31556926, # one year in seconds
|
||||||
secret: $config['session_secret']
|
secret: $config['session_secret'],
|
||||||
|
httponly: true,
|
||||||
|
same_site: true,
|
||||||
|
secure: ENV['RACK_ENV'] == 'production'
|
||||||
|
|
||||||
use Rack::Recaptcha, public_key: $config['recaptcha_public_key'], private_key: $config['recaptcha_private_key']
|
use Rack::Recaptcha, public_key: $config['recaptcha_public_key'], private_key: $config['recaptcha_private_key']
|
||||||
use Rack::TempfileReaper
|
use Rack::TempfileReaper
|
||||||
|
|
Loading…
Add table
Reference in a new issue