Skip to content

Commit

Permalink
docs: fix localRedirect docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tigerwill90 committed Jun 24, 2024
1 parent 4aa1301 commit 7c00186
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions fox.go
Original file line number Diff line number Diff line change
Expand Up @@ -611,11 +611,8 @@ func applyMiddleware(scope MiddlewareScope, mws []middleware, h HandlerFunc) Han
}

// localRedirect redirect the client to the new path, but it does not convert relative paths to absolute paths
// like Redirect does.
// If the Content-Type header has not been set, localRedirect sets it
// to "text/html; charset=utf-8" and writes a small HTML body.
// Setting the Content-Type header to any value, including nil,
// disables that behavior.
// like Redirect does. If the Content-Type header has not been set, localRedirect sets it to "text/html; charset=utf-8"
// and writes a small HTML body. Setting the Content-Type header to any value, including nil, disables that behavior.
func localRedirect(w http.ResponseWriter, r *http.Request, path string, code int) {
if q := r.URL.RawQuery; q != "" {
path += "?" + q
Expand Down

0 comments on commit 7c00186

Please sign in to comment.