frontend.go 669 B

1234567891011121314151617181920212223242526272829
  1. package engine
  2. /*
  3. import (
  4. "fmt"
  5. )
  6. */
  7. func (this *Engine) FrontEnd() bool {
  8. /*
  9. if this.Wrap.R.URL.Path == "/" {
  10. this.Wrap.W.Header().Set("Cache-Control", "no-cache, no-store, must-revalidate")
  11. this.Wrap.W.Header().Set("Content-Type", "text/html")
  12. counter := this.Wrap.S.GetInt("counter", 0)
  13. // this.Wrap.LogAccess(fmt.Sprintf("Counter value was: %d", counter))
  14. this.Wrap.W.Write([]byte(`Logic -> (` + fmt.Sprintf("%d", counter) + `)`))
  15. counter++
  16. this.Wrap.S.SetInt("counter", counter)
  17. // this.Wrap.LogAccess(fmt.Sprintf("Counter value now: %d", counter))
  18. return true
  19. }
  20. */
  21. // return false
  22. return this.Mods.FrontEnd(this.Wrap)
  23. }