Skip to content

Commit 4797c86

Browse files
feat(*): Prepare release 0.20.0
1 parent fe53bef commit 4797c86

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

77

8+
9+
## [0.20.0] - 2022-03-31
10+
11+
### Changed
12+
- Require a minimum of 1 for `clean_ip_cache_duration` and `bad_ip_cache_duration` settings
13+
- Do not use session for geolocation if `save_in_session` setting is not true.
14+
815
## [0.19.0] - 2022-03-24
916

1017
### Added

src/Constants.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Constants
2020
public const DEFAULT_LAPI_URL = 'http://localhost:8080';
2121

2222
/** @var string The last version of this library */
23-
public const VERSION = 'v0.19.0';
23+
public const VERSION = 'v0.20.0';
2424

2525
/** @var string The user agent used to send request to LAPI */
2626
public const BASE_USER_AGENT = 'PHP CrowdSec Bouncer/'.self::VERSION;

src/Geolocation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function getCountryResult(array $geolocConfig, string $ip): array
7676
{
7777
$result = $this->resultTemplate;
7878
$saveInSession = !empty($geolocConfig['save_in_session']);
79-
if($saveInSession){
79+
if ($saveInSession) {
8080
if ($country = Session::getSessionVariable('crowdsec_geolocation_country')) {
8181
$result['country'] = $country;
8282

src/StandaloneBounce.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class StandaloneBounce extends AbstractBounce implements IBounce
3030
/**
3131
* @var string
3232
*/
33-
const SESSION_NAME = 'crowdsec';
33+
public const SESSION_NAME = 'crowdsec';
3434

3535
/**
3636
* Initialize the bouncer.

0 commit comments

Comments
 (0)