浏览代码

auto update script executed

Toby Chui 1 年之前
父节点
当前提交
6b7decac67
共有 2 个文件被更改,包括 2 次插入5 次删除
  1. 1 4
      mod/dynamicproxy/redirection/handler.go
  2. 1 1
      web/components/redirection.html

+ 1 - 4
mod/dynamicproxy/redirection/handler.go

@@ -28,10 +28,7 @@ func (t *RuleTable) HandleRedirect(w http.ResponseWriter, r *http.Request) int {
 	rr := t.MatchRedirectRule(requestPath)
 	if rr != nil {
 		redirectTarget := rr.TargetURL
-		//Always pad a / at the back of the target URL
-		if redirectTarget[len(redirectTarget)-1:] != "/" {
-			redirectTarget += "/"
-		}
+
 		if rr.ForwardChildpath {
 			//Remove the first / in the path
 			redirectTarget += strings.TrimPrefix(r.URL.Path, "/")

+ 1 - 1
web/components/redirection.html

@@ -39,7 +39,7 @@
         <div class="field">
           <label>Destination URL (To)</label>
           <input type="text" name="destination-url" placeholder="Destination URL">
-          <small><i class="ui circle info icon"></i> The target URL request being redirected to, e.g. dest.example.com/mysite</small>
+          <small><i class="ui circle info icon"></i> The target URL request being redirected to, e.g. dest.example.com/mysite/ or dest.example.com/script.php, <b>sometime you might need to add tailing slash (/) to your URL depending on your use cases</b></small>
         </div>
         <div class="field">
           <div class="ui checkbox">