Skip to content

Commit

Permalink
Fixed Session cookies not being sent via non HTTPS
Browse files Browse the repository at this point in the history
  • Loading branch information
jamielsharief committed Jul 23, 2019
1 parent 294fb87 commit f1e91b0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ Upload: git push origin --tags
Delete tag: git tag -d <tag_name>

## [Unreleased]
## [1.24.1] - 2019-07-23
### Fixed
- Session cookies not being sent via non HTTPS

## [1.24.0] - 2019-07-23
### Added
- Added Schema::addIndex Type option to allow for creating fulltext indexes
Expand Down
5 changes: 4 additions & 1 deletion src/Http/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,13 @@ public function __construct()

$config = [
'session.save_path' => TMP . DS . 'sessions',
'session.cookie_secure' => 1,
'session.cookie_httponly' => 1,
];

if (env('HTTPS')) {
$config['session.cookie_secure'] = 1;
}

if (! $this->started() and ! headers_sent()) {
$this->setIniConfig($config);
}
Expand Down

0 comments on commit f1e91b0

Please sign in to comment.