diff options
author | Matthew Holt <mholt@users.noreply.github.com> | 2020-02-06 18:46:52 -0700 |
---|---|---|
committer | Matthew Holt <mholt@users.noreply.github.com> | 2020-02-06 18:46:52 -0700 |
commit | 8b28c36d480070c8cf954cb27bec3b44bd7d12ca (patch) | |
tree | 4219adc87173ea3af7603e36e8ef44bb8a791f40 /pkg/caddyscript/matcherenv.go | |
parent | 4a07a5d41e0f54d1a1ec998b9d956ccf2a880d90 (diff) |
Remove Starlark, for now
This is temporary as we prepare for a stable v2 release. We don't want
to make promises we don't know we can keep, and the Starlark integration
deserves much more focused attention which resources and funding do not
currently permit. When the project is financially stable, I will be able
to revisit this properly and add flexible, robust Starlark scripting
support to Caddy 2.
Diffstat (limited to 'pkg/caddyscript/matcherenv.go')
-rw-r--r-- | pkg/caddyscript/matcherenv.go | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/pkg/caddyscript/matcherenv.go b/pkg/caddyscript/matcherenv.go deleted file mode 100644 index 6c9fb50..0000000 --- a/pkg/caddyscript/matcherenv.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2015 Matthew Holt and The Caddy Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package caddyscript - -import ( - "net/http" - - caddyscript "github.com/caddyserver/caddy/v2/pkg/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 -} |