From 3bc2d3e3b1f3670fd25333d5a61eda4375c9e596 Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Mon, 24 Sep 2018 05:51:23 +0900 Subject: [PATCH] Update uri.php --- system/uri.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/system/uri.php b/system/uri.php index 3f78714..fd18f08 100644 --- a/system/uri.php +++ b/system/uri.php @@ -133,8 +133,17 @@ if(!function_exists("get_route_link")) { } } +// URI: Uniform Resource Identifier +// URL: Uniform Resource Locator if(!function_exists("redirect_uri")) { - function redirect_uri($uri, $permanent=false) { + function redirect_uri($uri, $permanent=false, $options=array()) { + if(array_key_equals("check_domain", $options, true)) { + if(!check_redirect_domain($uri)) { + set_error("Invalid redirect URL"); + show_errors(); + } + } + header("Location: " . $uri, true, $permanent ? 301 : 302); exit(); }