Run form sending in goroutine
This commit is contained in:
parent
51df3e5760
commit
96053ce350
2
forms.go
2
forms.go
|
@ -21,9 +21,11 @@ func FormHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
}
|
}
|
||||||
_ = r.ParseForm()
|
_ = r.ParseForm()
|
||||||
sanitizedForm := sanitizeForm(r.PostForm)
|
sanitizedForm := sanitizeForm(r.PostForm)
|
||||||
|
go func() {
|
||||||
if !isBot(sanitizedForm) {
|
if !isBot(sanitizedForm) {
|
||||||
sendForm(sanitizedForm)
|
sendForm(sanitizedForm)
|
||||||
}
|
}
|
||||||
|
}()
|
||||||
sendResponse(sanitizedForm, w)
|
sendResponse(sanitizedForm, w)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue
Block a user