1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-20 02:57:05 +00:00

Make monitor configurable for #44

This commit is contained in:
James Hillyerd
2017-01-21 19:15:44 -08:00
parent c346372c85
commit 9ae428ca44
11 changed files with 108 additions and 8 deletions

View File

@@ -6,6 +6,7 @@ import (
"github.com/gorilla/mux"
"github.com/gorilla/sessions"
"github.com/jhillyerd/inbucket/config"
"github.com/jhillyerd/inbucket/msghub"
"github.com/jhillyerd/inbucket/smtpd"
)
@@ -16,6 +17,7 @@ type Context struct {
Session *sessions.Session
DataStore smtpd.DataStore
MsgHub *msghub.Hub
WebConfig config.WebConfig
IsJSON bool
}
@@ -59,6 +61,7 @@ func NewContext(req *http.Request) (*Context, error) {
Session: sess,
DataStore: DataStore,
MsgHub: msgHub,
WebConfig: webConfig,
IsJSON: headerMatch(req, "Accept", "application/json"),
}
return ctx, err