summaryrefslogtreecommitdiff
path: root/internal/caddyscript/matcherenv.go
diff options
context:
space:
mode:
authordev <navdgo@gmail.com>2019-05-14 10:35:41 -0400
committerdev <navdgo@gmail.com>2019-05-20 14:48:26 -0400
commit043eb1d9e5db456b9b78c0423cb44716fc81a932 (patch)
treea78aee0752b03c4f3c3cb45d409107e64faa10e3 /internal/caddyscript/matcherenv.go
parentfec7fa8bfda713e8042b9bbf9a480c7792b78c41 (diff)
move internal packages to pkg folder and update reverse proxy
* set automatic https error type for cert-magic failures * add state to onload and unload methods * update reverse proxy to use Provision() and Cleanup()
Diffstat (limited to 'internal/caddyscript/matcherenv.go')
-rw-r--r--internal/caddyscript/matcherenv.go18
1 files changed, 0 insertions, 18 deletions
diff --git a/internal/caddyscript/matcherenv.go b/internal/caddyscript/matcherenv.go
deleted file mode 100644
index c6c8c0e..0000000
--- a/internal/caddyscript/matcherenv.go
+++ /dev/null
@@ -1,18 +0,0 @@
-package caddyscript
-
-import (
- "net/http"
-
- caddyscript "bitbucket.org/lightcodelabs/caddy2/internal/caddyscript/lib"
- "go.starlark.net/starlark"
-)
-
-// MatcherEnv sets up the global context for the matcher caddyscript environment.
-func MatcherEnv(r *http.Request) starlark.StringDict {
- env := make(starlark.StringDict)
- env["req"] = caddyscript.HTTPRequest{Req: r}
- env["time"] = caddyscript.Time{}
- env["regexp"] = caddyscript.Regexp{}
-
- return env
-}