From b3589085dd1643e0c953d396d7515514651c1356 Mon Sep 17 00:00:00 2001 From: kenjis Date: Fri, 18 Mar 2022 11:59:00 +0900 Subject: [PATCH] docs: clarify that current_url() returns URL based on Config\App --- system/Helpers/url_helper.php | 2 +- user_guide_src/source/helpers/url_helper.rst | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/system/Helpers/url_helper.php b/system/Helpers/url_helper.php index 98dd596c1a4d..e1e8b8a30e32 100644 --- a/system/Helpers/url_helper.php +++ b/system/Helpers/url_helper.php @@ -109,7 +109,7 @@ function base_url($relativePath = '', ?string $scheme = null): string if (! function_exists('current_url')) { /** - * Returns the current full URL based on the IncomingRequest. + * Returns the current full URL based on the Config\App settings and IncomingRequest. * String returns ignore query and fragment parts. * * @param bool $returnObject True to return an object instead of a string diff --git a/user_guide_src/source/helpers/url_helper.rst b/user_guide_src/source/helpers/url_helper.rst index 37374890548e..8f0252c27cff 100644 --- a/user_guide_src/source/helpers/url_helper.rst +++ b/user_guide_src/source/helpers/url_helper.rst @@ -88,8 +88,9 @@ The following functions are available: :returns: The current URL :rtype: string|\\CodeIgniter\\HTTP\\URI - Returns the full URL (including segments) of the page being currently - viewed. + Returns the full URL (including segments) of the page being currently viewed. + However for security reasons, it is created based on the ``Config\App`` settings, + and not intended to match the browser URL. .. note:: Calling this function is the same as doing this: