1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-19 05:09:42 +02:00

pointers to Runtime!

This commit is contained in:
Harvey Kandola 2017-07-24 19:10:49 +01:00
parent 792c3e2ce8
commit 27640dffc4
15 changed files with 315 additions and 82 deletions

View file

@ -28,7 +28,7 @@ import (
)
type middleware struct {
Runtime env.Runtime
Runtime *env.Runtime
}
func (m *middleware) cors(w http.ResponseWriter, r *http.Request, next http.HandlerFunc) {
@ -194,7 +194,7 @@ func (m *middleware) Authorize(w http.ResponseWriter, r *http.Request, next http
// Certain assets/URL do not require authentication.
// Just stops the log files being clogged up with failed auth errors.
func preAuthorizeStaticAssets(rt env.Runtime, r *http.Request) bool {
func preAuthorizeStaticAssets(rt *env.Runtime, r *http.Request) bool {
if strings.ToLower(r.URL.Path) == "/" ||
strings.ToLower(r.URL.Path) == "/validate" ||
strings.ToLower(r.URL.Path) == "/favicon.ico" ||