INNER CODE UNIT · Go
func
aleibovici/cryptopump · main.go:170
func (fh *myHandler) handler(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/html") /* Set the Content-Type header */
w.Header().Set("X-Content-Type-Options", "nosniff") /* Add X-Content-Type-Options header */
w.Header().Add("Strict-Transport-Security", "max-age=63072000; includeSubDomains") /* Add Strict-Transport-Security header */
w.Header().Add("X-Frame-Options", "DENY") /* Add X-Frame-Options header */
fh.configData = functions.GetConfigData(fh.viperData, fh.sessionData) /* Get configuration data */
switch r.Method {
case "GET":
/* Determine the URI path to de taken */
switch r.URL.Path {
case "/":
fh.configData.HTMLSnippet = plotter.Data{}.Plot(fh.sessionData) /* Load dynamic components in configData */
functions.ExecuteTemplate(w, fh.configData, fh.sessionData) /* This is the template execution for 'index' */