SUrvey now works
This commit is contained in:
@@ -41,13 +41,15 @@ func handlePost(w http.ResponseWriter, r *http.Request) {
|
||||
handleGet(w, r)
|
||||
}
|
||||
|
||||
http.Redirect(w, r, "/thankyou", http.StatusSeeOther)
|
||||
}
|
||||
|
||||
func handleGet(w http.ResponseWriter, r *http.Request) {
|
||||
lp := filepath.Join("application", "layouts", "main.html")
|
||||
fp := filepath.Join("application", "views", "signup.html")
|
||||
|
||||
log.Println("Hitting Signup")
|
||||
// add a CSP header to allow only same-origin scripts
|
||||
w.Header().Set("Content-Security-Policy", "script-src 'unsafe-eval' 'self'")
|
||||
|
||||
// Return a 404 if the template doesn't exist
|
||||
info, err := os.Stat(fp)
|
||||
|
||||
Reference in New Issue
Block a user