Skip to content

Commit 21d2763

Browse files
committed
Fixed an import bug, added SetSecretKey to allow the setting of the cookie secretKey if needed
1 parent 04ed4de commit 21d2763

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

revel.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ var (
100100
requestLog = log.New(ioutil.Discard, "", 0)
101101
requestLogTimeFormat = "2006/01/02 15:04:05.000"
102102

103+
// True when revel engine has been initialized (Init has returned)
103104
Initialized bool
104105

105106
// Private
@@ -223,6 +224,11 @@ func Init(mode, importPath, srcPath string) {
223224
INFO.Printf("Initialized Revel v%s (%s) for %s", Version, BuildDate, MinimumGoVersion)
224225
}
225226

227+
func SetSecretKey(newKey []byte ) error{
228+
secretKey = newKey
229+
return nil
230+
}
231+
226232
// Create a logger using log.* directives in app.conf plus the current settings
227233
// on the default logger.
228234
func getLogger(name string) *log.Logger {

template_adapter_go.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99
"reflect"
1010
"strings"
1111
"time"
12-
"github.com/revel.old/revel"
1312
)
1413

1514
const GO_TEMPLATE = "go"
@@ -214,7 +213,7 @@ func (engine *GoEngine) Event(action string, i interface{}) {
214213
engine.templatesBylowerName = map[string]*GoTemplate{}
215214
engine.templateSet = template.New("__root__").Funcs(TemplateFuncs)
216215
// Check to see what should be used for case sensitivity
217-
engine.CaseInsensitiveMode = revel.Config.StringDefault("go.template.path","lower")!="case"
216+
engine.CaseInsensitiveMode = Config.StringDefault("go.template.path","lower")!="case"
218217
}
219218
}
220219
func init() {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy