adding tests for YOURLS functionality

This commit is contained in:
El RIDO
2022-10-23 13:09:54 +02:00
parent 4bd5ef9cda
commit 78e915e049
6 changed files with 135 additions and 22 deletions

View File

@@ -137,8 +137,7 @@ class Request
} elseif (array_key_exists('jsonld', $this->_params) && !empty($this->_params['jsonld'])) {
$this->_operation = 'jsonld';
} elseif (array_key_exists('link', $this->_params) && !empty($this->_params['link'])) {
$request_url = filter_var($_SERVER['REQUEST_URI'], FILTER_SANITIZE_URL);
if (strpos($request_url, '/shortenviayourls?link=') !== false) {
if (strpos($this->getRequestUri(), '/shortenviayourls') !== false) {
$this->_operation = 'yourlsproxy';
}
}