mirror of
https://github.com/friendica/friendica
synced 2025-04-24 23:50:20 +00:00
Issue 3700: Security and Privacy related Headers
This commit is contained in:
parent
cf6874cffc
commit
7a3bb02f11
3 changed files with 20 additions and 0 deletions
|
@ -2,6 +2,8 @@
|
|||
// Session management functions. These provide database storage of PHP
|
||||
// session info.
|
||||
|
||||
use Friendica\Core\Config;
|
||||
|
||||
require_once('include/cache.php');
|
||||
|
||||
$session_exists = 0;
|
||||
|
@ -114,6 +116,10 @@ ini_set('session.gc_probability', $gc_probability);
|
|||
ini_set('session.use_only_cookies', 1);
|
||||
ini_set('session.cookie_httponly', 1);
|
||||
|
||||
if (Config::get('system', 'ssl_policy') == SSL_POLICY_FULL) {
|
||||
ini_set('session.cookie_secure', 1);
|
||||
}
|
||||
|
||||
if (!get_config('system', 'disable_database_session')) {
|
||||
session_set_save_handler('ref_session_open', 'ref_session_close',
|
||||
'ref_session_read', 'ref_session_write',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue