repo
stringlengths
6
47
file_url
stringlengths
77
269
file_path
stringlengths
5
186
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-07 08:35:43
2026-01-07 08:55:24
truncated
bool
2 classes
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddyconfig/caddyfile/importargs.go
caddyconfig/caddyfile/importargs.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddytest/caddytest_test.go
caddytest/caddytest_test.go
package caddytest import ( "net/http" "strings" "testing" ) func TestReplaceCertificatePaths(t *testing.T) { rawConfig := `a.caddy.localhost:9443 { tls /caddy.localhost.crt /caddy.localhost.key { } redir / https://b.caddy.localhost:9443/version 301 respond /version 200 { body "hello from a.caddy...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddytest/caddytest.go
caddytest/caddytest.go
package caddytest import ( "bytes" "context" "crypto/tls" "encoding/json" "errors" "fmt" "io" "io/fs" "log" "net" "net/http" "net/http/cookiejar" "os" "path" "reflect" "regexp" "runtime" "strings" "testing" "time" "github.com/aryann/difflib" caddycmd "github.com/caddyserver/caddy/v2/cmd" "git...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddytest/integration/map_test.go
caddytest/integration/map_test.go
package integration import ( "bytes" "testing" "github.com/caddyserver/caddy/v2/caddytest" ) func TestMap(t *testing.T) { // arrange tester := caddytest.NewTester(t) tester.InitServer(`{ skip_install_trust admin localhost:2999 http_port 9080 https_port 9443 grace_period 1ns } localhost:908...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddytest/integration/handler_test.go
caddytest/integration/handler_test.go
package integration import ( "bytes" "net/http" "testing" "github.com/caddyserver/caddy/v2/caddytest" ) func TestBrowse(t *testing.T) { tester := caddytest.NewTester(t) tester.InitServer(` { skip_install_trust admin localhost:2999 http_port 9080 https_port 9443 grace_period 1ns } http://lo...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddytest/integration/intercept_test.go
caddytest/integration/intercept_test.go
package integration import ( "testing" "github.com/caddyserver/caddy/v2/caddytest" ) func TestIntercept(t *testing.T) { tester := caddytest.NewTester(t) tester.InitServer(`{ skip_install_trust admin localhost:2999 http_port 9080 https_port 9443 grace_period 1ns } localhost:9080 { ...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddytest/integration/sni_test.go
caddytest/integration/sni_test.go
package integration import ( "testing" "github.com/caddyserver/caddy/v2/caddytest" ) func TestDefaultSNI(t *testing.T) { // arrange tester := caddytest.NewTester(t) tester.InitServer(`{ "admin": { "listen": "localhost:2999" }, "apps": { "http": { "http_port": 9080, "https_port": 9443, "g...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddytest/integration/acmeserver_test.go
caddytest/integration/acmeserver_test.go
package integration import ( "context" "crypto/ecdsa" "crypto/elliptic" "crypto/rand" "log/slog" "strings" "testing" "github.com/mholt/acmez/v3" "github.com/mholt/acmez/v3/acme" "go.uber.org/zap" "go.uber.org/zap/exp/zapslog" "github.com/caddyserver/caddy/v2/caddytest" ) func TestACMEServerDirectory(t *...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddytest/integration/reverseproxy_test.go
caddytest/integration/reverseproxy_test.go
package integration import ( "fmt" "net" "net/http" "os" "runtime" "strings" "testing" "time" "github.com/caddyserver/caddy/v2/caddytest" ) func TestSRVReverseProxy(t *testing.T) { tester := caddytest.NewTester(t) tester.InitServer(` { "admin": { "listen": "localhost:2999" }, "apps": { "pki":...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddytest/integration/stream_test.go
caddytest/integration/stream_test.go
package integration import ( "compress/gzip" "context" "crypto/rand" "fmt" "io" "net/http" "net/http/httputil" "net/url" "strings" "testing" "time" "golang.org/x/net/http2" "golang.org/x/net/http2/h2c" "github.com/caddyserver/caddy/v2/caddytest" ) // (see https://github.com/caddyserver/caddy/issues/35...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddytest/integration/caddyfile_test.go
caddytest/integration/caddyfile_test.go
package integration import ( "net/http" "net/url" "testing" "github.com/caddyserver/caddy/v2/caddytest" ) func TestRespond(t *testing.T) { // arrange tester := caddytest.NewTester(t) tester.InitServer(` { admin localhost:2999 http_port 9080 https_port 9443 grace_period 1ns } ...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddytest/integration/leafcertloaders_test.go
caddytest/integration/leafcertloaders_test.go
package integration import ( "testing" "github.com/caddyserver/caddy/v2/caddytest" ) func TestLeafCertLoaders(t *testing.T) { tester := caddytest.NewTester(t) tester.InitServer(` { "admin": { "listen": "localhost:2999" }, "apps": { "http": { "http_port": 9080, "https_port": 9443, "...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddytest/integration/mockdns_test.go
caddytest/integration/mockdns_test.go
package integration import ( "context" "github.com/caddyserver/certmagic" "github.com/libdns/libdns" "github.com/caddyserver/caddy/v2" "github.com/caddyserver/caddy/v2/caddyconfig/caddyfile" ) func init() { caddy.RegisterModule(MockDNSProvider{}) } // MockDNSProvider is a mock DNS provider, for testing confi...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddytest/integration/pki_test.go
caddytest/integration/pki_test.go
package integration import ( "testing" "github.com/caddyserver/caddy/v2/caddytest" ) func TestLeafCertLifetimeLessThanIntermediate(t *testing.T) { caddytest.AssertLoadError(t, ` { "admin": { "disabled": true }, "apps": { "http": { "servers": { "srv0": { ...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddytest/integration/listener_test.go
caddytest/integration/listener_test.go
package integration import ( "bytes" "fmt" "math/rand" "net" "net/http" "strings" "testing" "github.com/caddyserver/caddy/v2/caddytest" ) func setupListenerWrapperTest(t *testing.T, handlerFunc http.HandlerFunc) *caddytest.Tester { l, err := net.Listen("tcp", "127.0.0.1:0") if err != nil { t.Fatalf("fail...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddytest/integration/h2listener_test.go
caddytest/integration/h2listener_test.go
package integration import ( "fmt" "net/http" "slices" "strings" "testing" "github.com/caddyserver/caddy/v2/caddytest" ) func newH2ListenerWithVersionsWithTLSTester(t *testing.T, serverVersions []string, clientVersions []string) *caddytest.Tester { const baseConfig = ` { skip_install_trust admin localhos...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddytest/integration/autohttps_test.go
caddytest/integration/autohttps_test.go
package integration import ( "net/http" "testing" "github.com/caddyserver/caddy/v2/caddytest" ) func TestAutoHTTPtoHTTPSRedirectsImplicitPort(t *testing.T) { tester := caddytest.NewTester(t) tester.InitServer(` { admin localhost:2999 skip_install_trust http_port 9080 https_port 9443 } localhos...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddytest/integration/acme_test.go
caddytest/integration/acme_test.go
package integration import ( "context" "crypto/ecdsa" "crypto/elliptic" "crypto/rand" "fmt" "log/slog" "net" "net/http" "strings" "testing" "github.com/mholt/acmez/v3" "github.com/mholt/acmez/v3/acme" smallstepacme "github.com/smallstep/certificates/acme" "go.uber.org/zap" "go.uber.org/zap/exp/zapslog"...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddytest/integration/caddyfile_adapt_test.go
caddytest/integration/caddyfile_adapt_test.go
package integration import ( jsonMod "encoding/json" "fmt" "os" "path/filepath" "regexp" "strings" "testing" "github.com/caddyserver/caddy/v2/caddyconfig" "github.com/caddyserver/caddy/v2/caddytest" _ "github.com/caddyserver/caddy/v2/internal/testmocks" ) func TestCaddyfileAdaptToJSON(t *testing.T) { // l...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/internal/ranges.go
internal/ranges.go
package internal // PrivateRangesCIDR returns a list of private CIDR range // strings, which can be used as a configuration shortcut. func PrivateRangesCIDR() []string { return []string{ "192.168.0.0/16", "172.16.0.0/12", "10.0.0.0/8", "127.0.0.1/8", "fd00::/8", "::1", } }
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/internal/sockets.go
internal/sockets.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/internal/logbuffer.go
internal/logbuffer.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/internal/logs.go
internal/logs.go
package internal import "fmt" // MaxSizeSubjectsListForLog returns the keys in the map as a slice of maximum length // maxToDisplay. It is useful for logging domains being managed, for example, since a // map is typically needed for quick lookup, but a slice is needed for logging, and this // can be quite a doozy sin...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/internal/testmocks/dummyverifier.go
internal/testmocks/dummyverifier.go
package testmocks import ( "crypto/x509" "github.com/caddyserver/caddy/v2" "github.com/caddyserver/caddy/v2/caddyconfig/caddyfile" "github.com/caddyserver/caddy/v2/modules/caddytls" ) func init() { caddy.RegisterModule(new(dummyVerifier)) } type dummyVerifier struct{} // UnmarshalCaddyfile implements caddyfil...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/internal/metrics/metrics.go
internal/metrics/metrics.go
package metrics import ( "net/http" "strconv" ) func SanitizeCode(s int) string { switch s { case 0, 200: return "200" default: return strconv.Itoa(s) } } // Only support the list of "regular" HTTP methods, see // https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods var methodMap = map[string]string{ ...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/internal/metrics/metrics_test.go
internal/metrics/metrics_test.go
package metrics import ( "strings" "testing" ) func TestSanitizeMethod(t *testing.T) { tests := []struct { method string expected string }{ {method: "get", expected: "GET"}, {method: "POST", expected: "POST"}, {method: "OPTIONS", expected: "OPTIONS"}, {method: "connect", expected: "CONNECT"}, {met...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/internal/filesystems/map.go
internal/filesystems/map.go
package filesystems import ( "io/fs" "strings" "sync" ) const ( DefaultFileSystemKey = "default" ) var DefaultFileSystem = &wrapperFs{key: DefaultFileSystemKey, FS: OsFS{}} // wrapperFs exists so can easily add to wrapperFs down the line type wrapperFs struct { key string fs.FS } // FileSystemMap stores a ma...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/internal/filesystems/os.go
internal/filesystems/os.go
package filesystems import ( "io/fs" "os" "path/filepath" ) // OsFS is a simple fs.FS implementation that uses the local // file system. (We do not use os.DirFS because we do our own // rooting or path prefixing without being constrained to a single // root folder. The standard os.DirFS implementation is problemat...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/filestorage/filestorage.go
modules/filestorage/filestorage.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/subroute.go
modules/caddyhttp/subroute.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/matchers_test.go
modules/caddyhttp/matchers_test.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/staticresp.go
modules/caddyhttp/staticresp.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/logging.go
modules/caddyhttp/logging.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/caddyhttp_test.go
modules/caddyhttp/caddyhttp_test.go
package caddyhttp import ( "net/url" "path/filepath" "runtime" "testing" ) func TestSanitizedPathJoin(t *testing.T) { // For reference: // %2e = . // %2f = / // %5c = \ for i, tc := range []struct { inputRoot string inputPath string expect string expectWindows string }{ { inputPa...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/metrics.go
modules/caddyhttp/metrics.go
package caddyhttp import ( "context" "errors" "net/http" "strings" "sync" "time" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" "github.com/caddyserver/caddy/v2" "github.com/caddyserver/caddy/v2/internal/metrics" ) // Metrics configures metrics o...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/replacer.go
modules/caddyhttp/replacer.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/caddyhttp.go
modules/caddyhttp/caddyhttp.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/responsewriter.go
modules/caddyhttp/responsewriter.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/matchers.go
modules/caddyhttp/matchers.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
true
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/server_test.go
modules/caddyhttp/server_test.go
package caddyhttp import ( "bytes" "context" "io" "net/http" "net/http/httptest" "net/netip" "testing" "time" "github.com/stretchr/testify/assert" "go.uber.org/zap" "go.uber.org/zap/zapcore" ) type writeFunc func(p []byte) (int, error) type nopSyncer writeFunc func (n nopSyncer) Write(p []byte) (int, er...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/errors.go
modules/caddyhttp/errors.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/staticresp_test.go
modules/caddyhttp/staticresp_test.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/celmatcher_test.go
modules/caddyhttp/celmatcher_test.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/staticerror.go
modules/caddyhttp/staticerror.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/ip_matchers.go
modules/caddyhttp/ip_matchers.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/marshalers.go
modules/caddyhttp/marshalers.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/responsematchers_test.go
modules/caddyhttp/responsematchers_test.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/server.go
modules/caddyhttp/server.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
true
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/responsewriter_test.go
modules/caddyhttp/responsewriter_test.go
package caddyhttp import ( "bytes" "io" "net/http" "strings" "testing" ) type responseWriterSpy interface { http.ResponseWriter Written() string CalledReadFrom() bool } var ( _ responseWriterSpy = (*baseRespWriter)(nil) _ responseWriterSpy = (*readFromRespWriter)(nil) ) // a barebones http.ResponseWriter ...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/vars.go
modules/caddyhttp/vars.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/celmatcher.go
modules/caddyhttp/celmatcher.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/http2listener.go
modules/caddyhttp/http2listener.go
package caddyhttp import ( "crypto/tls" "io" "net" "go.uber.org/zap" "golang.org/x/net/http2" ) type connectionStater interface { ConnectionState() tls.ConnectionState } // http2Listener wraps the listener to solve the following problems: // 1. prevent genuine h2c connections from succeeding if h2c is not ena...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/replacer_test.go
modules/caddyhttp/replacer_test.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/httpredirectlistener.go
modules/caddyhttp/httpredirectlistener.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/invoke.go
modules/caddyhttp/invoke.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/responsematchers.go
modules/caddyhttp/responsematchers.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/ip_range.go
modules/caddyhttp/ip_range.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/app.go
modules/caddyhttp/app.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/metrics_test.go
modules/caddyhttp/metrics_test.go
package caddyhttp import ( "context" "crypto/tls" "errors" "net/http" "net/http/httptest" "strings" "sync" "testing" "github.com/prometheus/client_golang/prometheus/testutil" "github.com/caddyserver/caddy/v2" ) func TestServerNameFromContext(t *testing.T) { ctx := context.Background() expected := "UNKNO...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/autohttps.go
modules/caddyhttp/autohttps.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/routes.go
modules/caddyhttp/routes.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/push/caddyfile.go
modules/caddyhttp/push/caddyfile.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/push/link.go
modules/caddyhttp/push/link.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/push/link_test.go
modules/caddyhttp/push/link_test.go
// 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 l...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/push/handler.go
modules/caddyhttp/push/handler.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/standard/imports.go
modules/caddyhttp/standard/imports.go
package standard import ( // standard Caddy HTTP app modules _ "github.com/caddyserver/caddy/v2/modules/caddyhttp" _ "github.com/caddyserver/caddy/v2/modules/caddyhttp/caddyauth" _ "github.com/caddyserver/caddy/v2/modules/caddyhttp/encode" _ "github.com/caddyserver/caddy/v2/modules/caddyhttp/encode/brotli" _ "gi...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/proxyprotocol/policy.go
modules/caddyhttp/proxyprotocol/policy.go
package proxyprotocol import ( "errors" "fmt" "strings" goproxy "github.com/pires/go-proxyproto" ) type Policy int // as defined in: https://pkg.go.dev/github.com/pires/go-proxyproto@v0.7.0#Policy const ( // IGNORE address from PROXY header, but accept connection PolicyIGNORE Policy = iota // USE address fro...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/proxyprotocol/module.go
modules/caddyhttp/proxyprotocol/module.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/proxyprotocol/listenerwrapper.go
modules/caddyhttp/proxyprotocol/listenerwrapper.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/logging/caddyfile.go
modules/caddyhttp/logging/caddyfile.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/logging/logappend.go
modules/caddyhttp/logging/logappend.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/tracing/tracer.go
modules/caddyhttp/tracing/tracer.go
package tracing import ( "context" "fmt" "net/http" "go.opentelemetry.io/contrib/exporters/autoexport" "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" "go.opentelemetry.io/contrib/propagators/autoprop" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/propagation" "go.opentelemet...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/tracing/tracerprovider_test.go
modules/caddyhttp/tracing/tracerprovider_test.go
package tracing import ( "testing" "go.uber.org/zap" ) func Test_tracersProvider_getTracerProvider(t *testing.T) { tp := tracerProvider{} tp.getTracerProvider() tp.getTracerProvider() if tp.tracerProvider == nil { t.Errorf("There should be tracer provider") } if tp.tracerProvidersCounter != 2 { t.Erro...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/tracing/module_test.go
modules/caddyhttp/tracing/module_test.go
package tracing import ( "context" "encoding/json" "errors" "net/http" "net/http/httptest" "strings" "testing" "go.opentelemetry.io/otel/sdk/trace" "go.opentelemetry.io/otel/sdk/trace/tracetest" "github.com/caddyserver/caddy/v2" "github.com/caddyserver/caddy/v2/caddyconfig/caddyfile" "github.com/caddyser...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/tracing/module.go
modules/caddyhttp/tracing/module.go
package tracing import ( "fmt" "net/http" "go.uber.org/zap" "github.com/caddyserver/caddy/v2" "github.com/caddyserver/caddy/v2/caddyconfig/caddyfile" "github.com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile" "github.com/caddyserver/caddy/v2/modules/caddyhttp" ) func init() { caddy.RegisterModule(Tracing{}...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/tracing/tracer_test.go
modules/caddyhttp/tracing/tracer_test.go
package tracing import ( "context" "testing" "github.com/caddyserver/caddy/v2" ) func TestOpenTelemetryWrapper_newOpenTelemetryWrapper(t *testing.T) { ctx, cancel := caddy.NewContext(caddy.Context{Context: context.Background()}) defer cancel() var otw openTelemetryWrapper var err error if otw, err = newOpe...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/tracing/tracerprovider.go
modules/caddyhttp/tracing/tracerprovider.go
package tracing import ( "context" "fmt" "sync" sdktrace "go.opentelemetry.io/otel/sdk/trace" "go.uber.org/zap" "go.uber.org/zap/zapcore" ) // globalTracerProvider stores global tracer provider and is responsible for graceful shutdown when nobody is using it. var globalTracerProvider = &tracerProvider{} type ...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/reverseproxy/addresses.go
modules/caddyhttp/reverseproxy/addresses.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/reverseproxy/admin.go
modules/caddyhttp/reverseproxy/admin.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/reverseproxy/metrics.go
modules/caddyhttp/reverseproxy/metrics.go
package reverseproxy import ( "errors" "runtime/debug" "sync" "time" "github.com/prometheus/client_golang/prometheus" "go.uber.org/zap" "go.uber.org/zap/zapcore" "github.com/caddyserver/caddy/v2" ) var reverseProxyMetrics = struct { once sync.Once upstreamsHealthy *prometheus.GaugeVec logger ...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/reverseproxy/healthchecks.go
modules/caddyhttp/reverseproxy/healthchecks.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/reverseproxy/httptransport_test.go
modules/caddyhttp/reverseproxy/httptransport_test.go
package reverseproxy import ( "encoding/json" "fmt" "reflect" "testing" "github.com/caddyserver/caddy/v2/caddyconfig/caddyfile" ) func TestHTTPTransportUnmarshalCaddyFileWithCaPools(t *testing.T) { const test_der_1 = `MIIDSzCCAjOgAwIBAgIUfIRObjWNUA4jxQ/0x8BOCvE2Vw4wDQYJKoZIhvcNAQELBQAwFjEUMBIGA1UEAwwLRWFzeS1SU...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/reverseproxy/selectionpolicies.go
modules/caddyhttp/reverseproxy/selectionpolicies.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/reverseproxy/hosts.go
modules/caddyhttp/reverseproxy/hosts.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/reverseproxy/upstreams_test.go
modules/caddyhttp/reverseproxy/upstreams_test.go
package reverseproxy import "testing" func TestResolveIpVersion(t *testing.T) { falseBool := false trueBool := true tests := []struct { Versions *IPVersions expectedIpVersion string }{ { Versions: &IPVersions{IPv4: &trueBool}, expectedIpVersion: "ip4", }, { Versions: ...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/reverseproxy/upstreams.go
modules/caddyhttp/reverseproxy/upstreams.go
package reverseproxy import ( "context" "encoding/json" "fmt" weakrand "math/rand" "net" "net/http" "strconv" "sync" "time" "go.uber.org/zap" "go.uber.org/zap/zapcore" "github.com/caddyserver/caddy/v2" ) func init() { caddy.RegisterModule(SRVUpstreams{}) caddy.RegisterModule(AUpstreams{}) caddy.Regis...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/reverseproxy/caddyfile.go
modules/caddyhttp/reverseproxy/caddyfile.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
true
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/reverseproxy/httptransport.go
modules/caddyhttp/reverseproxy/httptransport.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/reverseproxy/addresses_test.go
modules/caddyhttp/reverseproxy/addresses_test.go
// 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 l...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/reverseproxy/ascii_test.go
modules/caddyhttp/reverseproxy/ascii_test.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/reverseproxy/buffering_test.go
modules/caddyhttp/reverseproxy/buffering_test.go
package reverseproxy import ( "io" "testing" ) type zeroReader struct{} func (zeroReader) Read(p []byte) (int, error) { for i := range p { p[i] = 0 } return len(p), nil } func TestBuffering(t *testing.T) { var ( h Handler zr zeroReader ) type args struct { body io.ReadCloser limit int64 } test...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/reverseproxy/ascii.go
modules/caddyhttp/reverseproxy/ascii.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/reverseproxy/reverseproxy.go
modules/caddyhttp/reverseproxy/reverseproxy.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
true
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/reverseproxy/copyresponse.go
modules/caddyhttp/reverseproxy/copyresponse.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/reverseproxy/streaming.go
modules/caddyhttp/reverseproxy/streaming.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/reverseproxy/command.go
modules/caddyhttp/reverseproxy/command.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/reverseproxy/streaming_test.go
modules/caddyhttp/reverseproxy/streaming_test.go
package reverseproxy import ( "bytes" "net/http/httptest" "strings" "testing" "github.com/caddyserver/caddy/v2" ) func TestHandlerCopyResponse(t *testing.T) { h := Handler{} testdata := []string{ "", strings.Repeat("a", defaultBufferSize), strings.Repeat("123456789 123456789 123456789 12", 3000), } d...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/reverseproxy/selectionpolicies_test.go
modules/caddyhttp/reverseproxy/selectionpolicies_test.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/reverseproxy/fastcgi/client.go
modules/caddyhttp/reverseproxy/fastcgi/client.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false
caddyserver/caddy
https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyhttp/reverseproxy/fastcgi/writer.go
modules/caddyhttp/reverseproxy/fastcgi/writer.go
// 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 applicab...
go
Apache-2.0
28103aafba3490eedb626823f9641b766c7c99fd
2026-01-07T08:35:43.461103Z
false