Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 14, 05:15 UTC
Change import paths to GitHub package names
Matthew Holt committed
Jun 4, 2019 at 13:52 UTC
613aecb8982d4addfcc01dc339ebbfcf0fd1e445
32 files changed
+63
-62
cmd/caddy2/main.go
+11
-11
@@ -1,19 +1,19 @@
1
package main
2
3
import (
4
- caddycmd "bitbucket.org/lightcodelabs/caddy2/cmd"
4
+ caddycmd "github.com/caddyserver/caddy2/cmd"
5
6
// this is where modules get plugged in
7
- _ "bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp"
8
- _ "bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp/caddylog"
9
- _ "bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp/fileserver"
10
- _ "bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp/headers"
11
- _ "bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp/markdown"
12
- _ "bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp/requestbody"
13
- _ "bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp/reverseproxy"
14
- _ "bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp/rewrite"
15
- _ "bitbucket.org/lightcodelabs/caddy2/modules/caddytls"
16
- _ "bitbucket.org/lightcodelabs/caddy2/modules/caddytls/standardstek"
7
+ _ "github.com/caddyserver/caddy2/modules/caddyhttp"
8
+ _ "github.com/caddyserver/caddy2/modules/caddyhttp/caddylog"
9
+ _ "github.com/caddyserver/caddy2/modules/caddyhttp/fileserver"
10
+ _ "github.com/caddyserver/caddy2/modules/caddyhttp/headers"
11
+ _ "github.com/caddyserver/caddy2/modules/caddyhttp/markdown"
12
+ _ "github.com/caddyserver/caddy2/modules/caddyhttp/requestbody"
13
+ _ "github.com/caddyserver/caddy2/modules/caddyhttp/reverseproxy"
14
+ _ "github.com/caddyserver/caddy2/modules/caddyhttp/rewrite"
15
+ _ "github.com/caddyserver/caddy2/modules/caddytls"
16
+ _ "github.com/caddyserver/caddy2/modules/caddytls/standardstek"
17
)
18
19
func main() {
cmd/run.go
+1
-1
@@ -4,7 +4,7 @@ import (
4
"flag"
5
"log"
6
7
- "bitbucket.org/lightcodelabs/caddy2"
7
+ "github.com/caddyserver/caddy2"
8
)
9
10
// Main executes the main function of the caddy command.
go.mod
+1
-1
@@ -1,4 +1,4 @@
1
-module bitbucket.org/lightcodelabs/caddy2
1
+module github.com/caddyserver/caddy2
2
3
go 1.12
4
modules/caddyhttp/caddyhttp.go
+2
-2
@@ -12,8 +12,8 @@ import (
12
"strings"
13
"time"
14
15
- "bitbucket.org/lightcodelabs/caddy2"
16
- "bitbucket.org/lightcodelabs/caddy2/modules/caddytls"
15
+ "github.com/caddyserver/caddy2"
16
+ "github.com/caddyserver/caddy2/modules/caddytls"
17
"github.com/mholt/certmagic"
18
)
19
modules/caddyhttp/caddylog/log.go
+2
-2
@@ -5,8 +5,8 @@ import (
5
"net/http"
6
"time"
7
8
- "bitbucket.org/lightcodelabs/caddy2"
9
- "bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp"
8
+ "github.com/caddyserver/caddy2"
9
+ "github.com/caddyserver/caddy2/modules/caddyhttp"
10
)
11
12
func init() {
modules/caddyhttp/errors.go
+1
-1
@@ -7,7 +7,7 @@ import (
7
"runtime"
8
"strings"
9
10
- "bitbucket.org/lightcodelabs/caddy2"
10
+ "github.com/caddyserver/caddy2"
11
)
12
13
// Error is a convenient way for a Handler to populate the
modules/caddyhttp/fileserver/browse.go
+2
-2
@@ -9,8 +9,8 @@ import (
9
"path"
10
"strings"
11
12
- "bitbucket.org/lightcodelabs/caddy2"
13
- "bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp"
12
+ "github.com/caddyserver/caddy2"
13
+ "github.com/caddyserver/caddy2/modules/caddyhttp"
14
)
15
16
// Browse configures directory browsing.
modules/caddyhttp/fileserver/browselisting.go
+1
-1
@@ -9,7 +9,7 @@ import (
9
"strings"
10
"time"
11
12
- "bitbucket.org/lightcodelabs/caddy2"
12
+ "github.com/caddyserver/caddy2"
13
"github.com/dustin/go-humanize"
14
)
15
modules/caddyhttp/fileserver/matcher.go
+2
-2
@@ -4,8 +4,8 @@ import (
4
"net/http"
5
"os"
6
7
- "bitbucket.org/lightcodelabs/caddy2"
8
- "bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp"
7
+ "github.com/caddyserver/caddy2"
8
+ "github.com/caddyserver/caddy2/modules/caddyhttp"
9
)
10
11
func init() {
modules/caddyhttp/fileserver/staticfiles.go
+2
-2
@@ -12,8 +12,8 @@ import (
12
"strings"
13
"time"
14
15
- "bitbucket.org/lightcodelabs/caddy2"
16
- "bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp"
15
+ "github.com/caddyserver/caddy2"
16
+ "github.com/caddyserver/caddy2/modules/caddyhttp"
17
)
18
19
func init() {
modules/caddyhttp/headers/headers.go
+2
-2
@@ -4,8 +4,8 @@ import (
4
"net/http"
5
"strings"
6
7
- "bitbucket.org/lightcodelabs/caddy2"
8
- "bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp"
7
+ "github.com/caddyserver/caddy2"
8
+ "github.com/caddyserver/caddy2/modules/caddyhttp"
9
)
10
11
func init() {
modules/caddyhttp/markdown/markdown.go
+2
-2
@@ -6,8 +6,8 @@ import (
6
7
"gopkg.in/russross/blackfriday.v2"
8
9
- "bitbucket.org/lightcodelabs/caddy2"
10
- "bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp"
9
+ "github.com/caddyserver/caddy2"
10
+ "github.com/caddyserver/caddy2/modules/caddyhttp"
11
)
12
13
func init() {
modules/caddyhttp/matchers.go
+2
-2
@@ -13,8 +13,8 @@ import (
13
"regexp"
14
"strings"
15
16
- "bitbucket.org/lightcodelabs/caddy2"
17
- "bitbucket.org/lightcodelabs/caddy2/pkg/caddyscript"
16
+ "github.com/caddyserver/caddy2"
17
+ "github.com/caddyserver/caddy2/pkg/caddyscript"
18
"go.starlark.net/starlark"
19
)
20
modules/caddyhttp/matchers_test.go
+1
-1
@@ -8,7 +8,7 @@ import (
8
"net/url"
9
"testing"
10
11
- "bitbucket.org/lightcodelabs/caddy2"
11
+ "github.com/caddyserver/caddy2"
12
)
13
14
func TestHostMatcher(t *testing.T) {
modules/caddyhttp/replacer.go
+1
-1
@@ -7,7 +7,7 @@ import (
7
"path"
8
"strings"
9
10
- "bitbucket.org/lightcodelabs/caddy2"
10
+ "github.com/caddyserver/caddy2"
11
)
12
13
// TODO: A simple way to format or escape or encode each value would be nice
modules/caddyhttp/requestbody/requestbody.go
+2
-2
@@ -3,8 +3,8 @@ package requestbody
3
import (
4
"net/http"
5
6
- "bitbucket.org/lightcodelabs/caddy2"
7
- "bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp"
6
+ "github.com/caddyserver/caddy2"
7
+ "github.com/caddyserver/caddy2/modules/caddyhttp"
8
)
9
10
func init() {
modules/caddyhttp/reverseproxy/module.go
+1
-1
@@ -1,7 +1,7 @@
1
package reverseproxy
2
3
import (
4
- "bitbucket.org/lightcodelabs/caddy2"
4
+ "github.com/caddyserver/caddy2"
5
)
6
7
// Register caddy module.
modules/caddyhttp/reverseproxy/upstream.go
+1
-1
@@ -14,7 +14,7 @@ import (
14
"sync/atomic"
15
"time"
16
17
- "bitbucket.org/lightcodelabs/caddy2"
17
+ "github.com/caddyserver/caddy2"
18
)
19
20
// CircuitBreaker defines the functionality of a circuit breaker module.
modules/caddyhttp/rewrite/rewrite.go
+2
-2
@@ -5,8 +5,8 @@ import (
5
"net/url"
6
"strings"
7
8
- "bitbucket.org/lightcodelabs/caddy2"
9
- "bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp"
8
+ "github.com/caddyserver/caddy2"
9
+ "github.com/caddyserver/caddy2/modules/caddyhttp"
10
)
11
12
func init() {
modules/caddyhttp/routes.go
+1
-1
@@ -5,7 +5,7 @@ import (
5
"fmt"
6
"net/http"
7
8
- "bitbucket.org/lightcodelabs/caddy2"
8
+ "github.com/caddyserver/caddy2"
9
)
10
11
// ServerRoute represents a set of matching rules,
modules/caddyhttp/server.go
+11
-10
@@ -8,20 +8,21 @@ import (
8
"net/http"
9
"strconv"
10
11
- "bitbucket.org/lightcodelabs/caddy2"
12
- "bitbucket.org/lightcodelabs/caddy2/modules/caddytls"
11
+ "github.com/caddyserver/caddy2"
12
+ "github.com/caddyserver/caddy2/modules/caddytls"
13
)
14
15
// Server is an HTTP server.
16
type Server struct {
17
- Listen []string `json:"listen,omitempty"`
18
- ReadTimeout caddy2.Duration `json:"read_timeout,omitempty"`
19
- ReadHeaderTimeout caddy2.Duration `json:"read_header_timeout,omitempty"`
20
- WriteTimeout caddy2.Duration `json:"write_timeout,omitempty"`
21
- IdleTimeout caddy2.Duration `json:"idle_timeout,omitempty"`
22
- MaxHeaderBytes int `json:"max_header_bytes,omitempty"`
23
- Routes RouteList `json:"routes,omitempty"`
24
- Errors *httpErrorConfig `json:"errors,omitempty"`
17
+ Listen []string `json:"listen,omitempty"`
18
+ ReadTimeout caddy2.Duration `json:"read_timeout,omitempty"`
19
+ ReadHeaderTimeout caddy2.Duration `json:"read_header_timeout,omitempty"`
20
+ WriteTimeout caddy2.Duration `json:"write_timeout,omitempty"`
21
+ IdleTimeout caddy2.Duration `json:"idle_timeout,omitempty"`
22
+ MaxHeaderBytes int `json:"max_header_bytes,omitempty"`
23
+ Routes RouteList `json:"routes,omitempty"`
24
+ Errors *httpErrorConfig `json:"errors,omitempty"`
25
+ // TODO: Having a separate connection policy to act as a default or template would be handy... then override using first matching conn policy...
26
TLSConnPolicies caddytls.ConnectionPolicies `json:"tls_connection_policies,omitempty"`
27
DisableAutoHTTPS bool `json:"disable_auto_https,omitempty"`
28
DisableAutoHTTPSRedir bool `json:"disable_auto_https_redir,omitempty"`
modules/caddyhttp/staticresp.go
+1
-1
@@ -5,7 +5,7 @@ import (
5
"net/http"
6
"strconv"
7
8
- "bitbucket.org/lightcodelabs/caddy2"
8
+ "github.com/caddyserver/caddy2"
9
)
10
11
func init() {
modules/caddyhttp/table.go
+1
-1
@@ -3,7 +3,7 @@ package caddyhttp
3
import (
4
"net/http"
5
6
- "bitbucket.org/lightcodelabs/caddy2"
6
+ "github.com/caddyserver/caddy2"
7
)
8
9
func init() {
modules/caddytls/acmemanager.go
+1
-1
@@ -7,7 +7,7 @@ import (
7
8
"github.com/go-acme/lego/certcrypto"
9
10
- "bitbucket.org/lightcodelabs/caddy2"
10
+ "github.com/caddyserver/caddy2"
11
"github.com/go-acme/lego/challenge"
12
"github.com/mholt/certmagic"
13
)
modules/caddytls/connpolicy.go
+1
-1
@@ -7,7 +7,7 @@ import (
7
"fmt"
8
"strings"
9
10
- "bitbucket.org/lightcodelabs/caddy2"
10
+ "github.com/caddyserver/caddy2"
11
"github.com/go-acme/lego/challenge/tlsalpn01"
12
"github.com/mholt/certmagic"
13
)
modules/caddytls/fileloader.go
+1
-1
@@ -5,7 +5,7 @@ import (
5
"fmt"
6
"io/ioutil"
7
8
- "bitbucket.org/lightcodelabs/caddy2"
8
+ "github.com/caddyserver/caddy2"
9
)
10
11
func init() {
modules/caddytls/folderloader.go
+1
-1
@@ -10,7 +10,7 @@ import (
10
"path/filepath"
11
"strings"
12
13
- "bitbucket.org/lightcodelabs/caddy2"
13
+ "github.com/caddyserver/caddy2"
14
)
15
16
func init() {
modules/caddytls/matchers.go
+1
-1
@@ -3,7 +3,7 @@ package caddytls
3
import (
4
"crypto/tls"
5
6
- "bitbucket.org/lightcodelabs/caddy2"
6
+ "github.com/caddyserver/caddy2"
7
)
8
9
// MatchServerName matches based on SNI.
modules/caddytls/sessiontickets.go
+1
-1
@@ -9,7 +9,7 @@ import (
9
"sync"
10
"time"
11
12
- "bitbucket.org/lightcodelabs/caddy2"
12
+ "github.com/caddyserver/caddy2"
13
)
14
15
// SessionTicketService configures and manages TLS session tickets.
modules/caddytls/standardstek/stek.go
+2
-2
@@ -5,8 +5,8 @@ import (
5
"sync"
6
"time"
7
8
- "bitbucket.org/lightcodelabs/caddy2"
9
- "bitbucket.org/lightcodelabs/caddy2/modules/caddytls"
8
+ "github.com/caddyserver/caddy2"
9
+ "github.com/caddyserver/caddy2/modules/caddytls"
10
)
11
12
func init() {
modules/caddytls/tls.go
+1
-1
@@ -6,7 +6,7 @@ import (
6
"fmt"
7
"net/http"
8
9
- "bitbucket.org/lightcodelabs/caddy2"
9
+ "github.com/caddyserver/caddy2"
10
"github.com/go-acme/lego/challenge"
11
"github.com/mholt/certmagic"
12
)
pkg/caddyscript/matcherenv.go
+1
-1
@@ -3,7 +3,7 @@ package caddyscript
3
import (
4
"net/http"
5
6
- caddyscript "bitbucket.org/lightcodelabs/caddy2/pkg/caddyscript/lib"
6
+ caddyscript "github.com/caddyserver/caddy2/pkg/caddyscript/lib"
7
"go.starlark.net/starlark"
8
)
9