mirror of
https://github.com/shlinkio/shlink.git
synced 2026-02-28 04:03:12 +08:00
Some changes in before-date rule wording
This commit is contained in:
@@ -8,7 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com), and this
|
||||
### Added
|
||||
* [#2431](https://github.com/shlinkio/shlink/issues/2431) Add new date-based condition for the dynamic rules redirections system.
|
||||
|
||||
* `before-date`: Allows to perform redirections based on an ISO 8601 date value, when the current date and time is earlier than the defined threshold.
|
||||
* `before-date`: Allows to perform redirections based on an ISO-8601 date value, when the current date and time is earlier than the defined threshold.
|
||||
|
||||
### Changed
|
||||
* [#2522](https://github.com/shlinkio/shlink/issues/2522) Shlink no longer tries to detect trusted proxies automatically, when resolving the visitor's IP address, as this is a potential security issue.
|
||||
|
||||
@@ -125,7 +125,7 @@ class RedirectRuleHandler implements RedirectRuleHandlerInterface
|
||||
$this->askMandatory('City name to match?', $io),
|
||||
),
|
||||
RedirectConditionType::BEFORE_DATE => RedirectCondition::forBeforeDate(
|
||||
normalizeDate($this->askMandatory('Date to match? (ISO 8601)', $io)),
|
||||
normalizeDate($this->askMandatory('Date to match?', $io)),
|
||||
),
|
||||
};
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ class RedirectRuleHandlerTest extends TestCase
|
||||
'IP address, CIDR block or wildcard-pattern (1.2.*.*)' => '1.2.3.4',
|
||||
'Country code to match?' => 'FR',
|
||||
'City name to match?' => 'Los angeles',
|
||||
'Date to match? (ISO 8601)' => '2016-05-01T20:34:16+02:00',
|
||||
'Date to match?' => '2016-05-01T20:34:16+02:00',
|
||||
default => '',
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user