Add password validation

This commit is contained in:
2024-04-25 22:51:37 +07:00
commit 2e2fbdf800
51 changed files with 3526 additions and 0 deletions

25
handler/misc/misc.go Normal file
View File

@ -0,0 +1,25 @@
package miscHandler
import (
"net/http"
)
func Robot(w http.ResponseWriter, r *http.Request) {
http.Redirect(w, r, "/public/robots.txt", http.StatusSeeOther)
}
func Favicon(w http.ResponseWriter, r *http.Request) {
//currentDir, _ := os.Getwd()
//fmt.Println(currentDir)
//logo := "../../../favicon.ico"
//basePath := filepath.Join(currentDir, "public")
//logoPath := filepath.Join(basePath, logo)
//fmt.Println(filepath.Dir(logoPath))
//if filepath.Dir(logoPath) != basePath {
// log.Print("invalid logo path", logoPath)
// w.WriteHeader(500)
// return
//}
//http.ServeContent()
http.Redirect(w, r, "/public/favicon.ico", http.StatusSeeOther)
}