Fix ob: type not registered for interface: map[string]string & superfluous response.WriteHeader, as well as wired up to go to custom 500 messages.
This commit is contained in:
@@ -32,6 +32,7 @@ package bootstrap
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"encoding/gob"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"time"
|
||||
@@ -79,10 +80,15 @@ func Load(configPath string) (*App, error) {
|
||||
return nil, fmt.Errorf("ensure schema: %w", err)
|
||||
}
|
||||
|
||||
gob.Register(map[string]string{})
|
||||
gob.Register([]string{})
|
||||
gob.Register(time.Time{})
|
||||
|
||||
sessions := session.New(cfg)
|
||||
|
||||
router := gin.New()
|
||||
router.Use(gin.Logger(), gin.Recovery())
|
||||
//router.Use(gin.Logger(), gin.Recovery())
|
||||
router.Use(gin.Logger())
|
||||
router.Static("/static", "./web/static")
|
||||
router.StaticFile("/favicon.ico", "./web/static/favicon.ico")
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package session
|
||||
|
||||
import (
|
||||
"encoding/gob"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
@@ -11,7 +10,6 @@ import (
|
||||
)
|
||||
|
||||
func New(cfg config.Config) *scs.SessionManager {
|
||||
gob.Register(time.Time{})
|
||||
s := scs.New()
|
||||
|
||||
// Lifetime (absolute max age)
|
||||
|
||||
Reference in New Issue
Block a user