fix: redirect middleware return type
This commit is contained in:
parent
b9976aef9c
commit
2f1a7154e4
1 changed files with 1 additions and 1 deletions
|
|
@ -2,7 +2,7 @@ package middleware
|
|||
|
||||
import "net/http"
|
||||
|
||||
func Redirect(path string) http.Handler {
|
||||
func Redirect(path string) http.HandlerFunc {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
if r.Header.Get("HX-Request") == "true" {
|
||||
w.Header().Set("HX-Redirect", path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue