Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/caddyserver/caddy
/ functions
Functions
2,647 in github.com/caddyserver/caddy
⨍
Functions
2,647
◇
Types & classes
525
↓ 1 callers
Method
UnmarshalCaddyfile
(d *caddyfile.Dispenser)
modules/caddyfs/filesystem.go:89
↓ 1 callers
Method
UnmarshalCaddyfile
UnmarshalCaddyfile sets up the handler from Caddyfile tokens. Syntax: intercept [<matcher>] { # intercept original responses @name {
modules/caddyhttp/intercept/intercept.go:226
↓ 1 callers
Method
UnmarshalCaddyfile
UnmarshalCaddyfile deserializes Caddyfile tokens into h. transport http { read_buffer <size> write_buffer <size>
modules/caddyhttp/reverseproxy/caddyfile.go:1023
↓ 1 callers
Method
UnmarshalCaddyfile
UnmarshalCaddyfile sets up the module from Caddyfile tokens. Syntax: journald { wrap <another encoder> } Example: log { format journal
modules/logging/journaldencoder.go:127
↓ 1 callers
Method
UnmarshalJSON
(p []byte)
modules/caddytls/certselection.go:196
↓ 1 callers
Method
Unregister
Unregister will remove the filesystem with key from the filesystem map if the key is the default key, it will set the default to the osFS instead of d
internal/filesystems/map.go:50
↓ 1 callers
Method
Unwrap
Unwrap returns the underlying ResponseWriter, necessary for http.ResponseController to work correctly.
metrics.go:82
↓ 1 callers
Method
Unwrap
Unwrap returns the underlying ResponseWriter, necessary for http.ResponseController to work correctly.
modules/caddyhttp/responsewriter.go:57
↓ 1 callers
Method
ValRaw
ValRaw gets the raw text of the current token (including quotes). If the token was a heredoc, then the delimiter is not included, because that is not
caddyconfig/caddyfile/dispenser.go:213
↓ 1 callers
Method
Validate
Validate validates m's regular expressions.
modules/caddyhttp/matchers.go:1172
↓ 1 callers
Method
VerifyClientCertificate
(rawCerts [][]byte, verifiedChains [][]*x509.Certificate)
modules/caddytls/connpolicy.go:1077
↓ 1 callers
Function
WasReplacedPlaceholderShorthand
WasReplacedPlaceholderShorthand checks if a token string was likely a replaced shorthand of the known Caddyfile placeholder replacement outputs. Usefu
caddyconfig/httpcaddyfile/httptype.go:1642
↓ 1 callers
Method
WithAttrs
(attrs []slog.Attr)
modules/caddyhttp/logging.go:315
↓ 1 callers
Method
WithGroup
(name string)
modules/caddyhttp/logging.go:325
↓ 1 callers
Method
WrapPacketConn
(net.PacketConn)
listeners.go:732
↓ 1 callers
Method
Write
(p []byte)
modules/caddyhttp/encode/encode_test.go:307
↓ 1 callers
Method
Write
(b []byte)
modules/caddyhttp/reverseproxy/httptransport.go:850
↓ 1 callers
Method
WriteHeader
EXPERIMENTAL: Subject to change or removal.
modules/caddyhttp/intercept/intercept.go:112
↓ 1 callers
Method
WriteHeader
(statusCode int)
modules/caddyhttp/templates/templates.go:524
↓ 1 callers
Method
WriteHeader
WriteHeader intercepts calls by the stdlib to WriteHeader to instead write the HTTP status code we want.
modules/caddyhttp/fileserver/staticfiles.go:821
↓ 1 callers
Method
activeHealthChecker
activeHealthChecker runs active health checks on a regular basis and blocks until h.HealthChecks.Active.stopChan is closed.
modules/caddyhttp/reverseproxy/healthchecks.go:271
↓ 1 callers
Method
activeHealthFails
activeHealthFails returns the number of consecutive active health check failures with the upstream.
modules/caddyhttp/reverseproxy/hosts.go:199
↓ 1 callers
Method
activeHealthPasses
activeHealthPasses returns the number of consecutive active health check passes with the upstream.
modules/caddyhttp/reverseproxy/hosts.go:194
↓ 1 callers
Method
addEdge
(from, to string)
caddyconfig/caddyfile/importgraph.go:55
↓ 1 callers
Method
addEdges
(from string, tos []string)
caddyconfig/caddyfile/importgraph.go:80
↓ 1 callers
Method
addEncoding
(e Encoding)
modules/caddyhttp/encode/encode.go:201
↓ 1 callers
Method
addNodes
(names []string)
caddyconfig/caddyfile/importgraph.go:39
↓ 1 callers
Method
addresses
()
caddyconfig/caddyfile/parse.go:210
↓ 1 callers
Function
adminPathAllowed
(reqPath, allowedPath string)
admin.go:725
↓ 1 callers
Function
allHeaderValues
allHeaderValues gets all values for a given header field, joined by a comma and space if more than one is set. If the header field is nil, then the om
modules/caddyhttp/reverseproxy/reverseproxy.go:1549
↓ 1 callers
Function
appendUniqueStrings
(existing []string, additions ...string)
caddyconfig/httpcaddyfile/tlsapp.go:889
↓ 1 callers
Function
applyServerOptions
applyServerOptions sets the server options on the appropriate servers
caddyconfig/httpcaddyfile/serveroptions.go:334
↓ 1 callers
Method
applySortAndLimit
(sortParam, orderParam, limitParam string, offsetParam string)
modules/caddyhttp/fileserver/browsetplcontext.go:219
↓ 1 callers
Method
areConnected
(from, to string)
caddyconfig/caddyfile/importgraph.go:90
↓ 1 callers
Function
attemptHttpCall
(client *http.Client, request *http.Request)
caddyconfig/httploader.go:138
↓ 1 callers
Method
automaticHTTPSPhase1
automaticHTTPSPhase1 provisions all route matchers, determines which domain names found in the routes qualify for automatic HTTPS, and sets up HTTP->H
modules/caddyhttp/autohttps.go:77
↓ 1 callers
Method
automaticHTTPSPhase2
automaticHTTPSPhase2 begins certificate management for all names in the qualifying domain set for each server. This phase must occur after provisionin
modules/caddyhttp/autohttps.go:869
↓ 1 callers
Function
automationPoliciesHaveCompatibleImplicitIssuers
automationPoliciesHaveCompatibleImplicitIssuers returns whether two policies without explicit issuers can be consolidated without changing default iss
caddyconfig/httpcaddyfile/tlsapp.go:1150
↓ 1 callers
Function
automationPoliciesHaveSameIssuers
(a, b *caddytls.AutomationPolicy)
caddyconfig/httpcaddyfile/tlsapp.go:1131
↓ 1 callers
Function
automationPolicyHasAllPublicNames
automationPolicyHasAllPublicNames returns true if all the names on the policy do NOT qualify for public certs OR are tailscale domains.
caddyconfig/httpcaddyfile/tlsapp.go:1185
↓ 1 callers
Method
begin
()
caddyconfig/caddyfile/parse.go:146
↓ 1 callers
Method
blockContents
()
caddyconfig/caddyfile/parse.go:293
↓ 1 callers
Function
brokenUpstreamAddr
brokenUpstreamAddr returns the address of a TCP listener that accepts connections but immediately closes them, causing a transport error (not a dial e
modules/caddyhttp/reverseproxy/retries_test.go:571
↓ 1 callers
Method
browseApplyQueryParams
browseApplyQueryParams applies query parameters to the listing. It mutates the listing and may set cookies.
modules/caddyhttp/fileserver/browse.go:239
↓ 1 callers
Method
buildEnv
buildEnv returns a set of CGI environment variables for the request.
modules/caddyhttp/reverseproxy/fastcgi/fastcgi.go:257
↓ 1 callers
Method
buildPKIApp
( pairings []sbAddrAssociation, options map[string]any, warnings []caddyconfig.Warning, )
caddyconfig/httpcaddyfile/pkiapp.go:197
↓ 1 callers
Function
buildQueryString
buildQueryString takes an input query string and performs replacements on each component, returning the resulting query string. This function appends
modules/caddyhttp/rewrite/rewrite.go:336
↓ 1 callers
Method
buildStandardTLSConfig
(ctx caddy.Context)
modules/caddytls/connpolicy.go:269
↓ 1 callers
Method
buildTLSApp
( pairings []sbAddrAssociation, options map[string]any, warnings []caddyconfig.Warning, )
caddyconfig/httpcaddyfile/tlsapp.go:36
↓ 1 callers
Method
canHazCertificate
canHazCertificate returns true if Tailscale reports it can get a certificate for the given ClientHello.
modules/caddytls/certmanagers.go:59
↓ 1 callers
Function
celFileMatcherMacroExpander
()
modules/caddyhttp/fileserver/matcher.go:225
↓ 1 callers
Function
celMatcherJSONMacroExpander
celMatcherJSONMacroExpander validates that the macro is called a single map literal argument. The following function call is returned: <funcName>(req
modules/caddyhttp/celmatcher.go:629
↓ 1 callers
Function
celMatcherStringMacroExpander
celMatcherStringMacroExpander validates that the macro is called a single string argument. The following function call is returned: <funcName>(reques
modules/caddyhttp/celmatcher.go:613
↓ 1 callers
Method
checkHost
checkHost returns a handler that wraps next such that it will only be called if the request's Host header matches a trustworthy/expected value. This h
admin.go:925
↓ 1 callers
Method
checkOrigin
checkOrigin ensures that the Origin header, if set, matches the intended target; prevents arbitrary sites from issuing requests to our listener. It re
admin.go:942
↓ 1 callers
Function
chunked
Checks whether chunked is part of the encodings stack
modules/caddyhttp/reverseproxy/fastcgi/client.go:381
↓ 1 callers
Method
cleanup
cleanup flush all remaining data and shutdown a tracerProvider
modules/caddyhttp/tracing/tracer.go:135
↓ 1 callers
Method
cleanupConnections
cleanupConnections closes hijacked connections. Depending on the value of StreamCloseDelay it does that either immediately or sets up a timer that wil
modules/caddyhttp/reverseproxy/streaming.go:429
↓ 1 callers
Method
clearDeadline
()
listen.go:199
↓ 1 callers
Method
clone
()
modules/caddyhttp/logging.go:157
↓ 1 callers
Function
cloneRequest
cloneRequest makes a semi-deep clone of origReq. Most of this code is borrowed from the Go stdlib reverse proxy, but we make a shallow-ish clone the
modules/caddyhttp/reverseproxy/reverseproxy.go:1505
↓ 1 callers
Method
closeCurlyBrace
closeCurlyBrace expects the current token to be a closing curly brace. This acts like an assertion because it returns an error if the token is not a c
caddyconfig/caddyfile/parse.go:715
↓ 1 callers
Method
closeLogs
closeLogs cleans up resources allocated during openLogs. A successful call to openLogs calls this automatically when the context is canceled.
logging.go:208
↓ 1 callers
Method
compileEncodedMatcherSets
(sblock serverBlock)
caddyconfig/httpcaddyfile/httptype.go:1461
↓ 1 callers
Function
computeApproximateRequestSize
taken from https://github.com/prometheus/client_golang/blob/6007b2b5cae01203111de55f753e76d8dac1f529/prometheus/promhttp/instrument_server.go#L298
modules/caddyhttp/metrics.go:388
↓ 1 callers
Method
configureServer
configureServer applies/binds the registered callback functions to the server.
modules/caddyhttp/server.go:705
↓ 1 callers
Method
consolidateAddrMappings
consolidateAddrMappings eliminates repetition of identical server blocks in a mapping of single listener addresses to protocols to lists of server blo
caddyconfig/httpcaddyfile/addresses.go:195
↓ 1 callers
Function
consolidateAutomationPolicies
consolidateAutomationPolicies combines automation policies that are the same, for a cleaner overall output.
caddyconfig/httpcaddyfile/tlsapp.go:969
↓ 1 callers
Function
consolidateConnPolicies
consolidateConnPolicies sorts any catch-all policy to the end, removes empty TLS connection policies, and combines equivalent ones for a cleaner overa
caddyconfig/httpcaddyfile/httptype.go:1064
↓ 1 callers
Function
contains
Helper function for string contains check
modules/caddytls/capools_test.go:983
↓ 1 callers
Method
copyBuffer
copyBuffer returns any write errors or non-EOF read errors, and the amount of bytes written.
modules/caddyhttp/reverseproxy/streaming.go:325
↓ 1 callers
Method
copyFromBackend
(errc chan<- error)
modules/caddyhttp/reverseproxy/streaming.go:647
↓ 1 callers
Method
correctPassword
(account Account, plaintextPassword []byte)
modules/caddyhttp/caddyauth/basicauth.go:165
↓ 1 callers
Method
countHealthFail
countHealthFail mutates the recent failures count by delta. It returns an error if the adjustment fails.
modules/caddyhttp/reverseproxy/hosts.go:235
↓ 1 callers
Method
countHealthPass
countHealthPass mutates the recent passes count by delta. It returns an error if the adjustment fails.
modules/caddyhttp/reverseproxy/hosts.go:225
↓ 1 callers
Method
createAutomationPolicies
createAutomationPolicies ensures that automated certificates for this app are managed properly. This adds up to two automation policies: one for the p
modules/caddyhttp/autohttps.go:597
↓ 1 callers
Function
decInFlightRequest
(address string)
modules/caddyhttp/reverseproxy/reverseproxy.go:58
↓ 1 callers
Function
decodeBase64DERCert
decodeBase64DERCert base64-decodes, then DER-decodes, certStr.
admin.go:1410
↓ 1 callers
Function
decodeBase64DERCert
decodeBase64DERCert base64-decodes, then DER-decodes, certStr.
modules/caddyhttp/reverseproxy/httptransport.go:863
↓ 1 callers
Function
detectConflictingSchemes
(srv *caddyhttp.Server, serverBlocks []serverBlock, options map[string]any)
caddyconfig/httpcaddyfile/httptype.go:1004
↓ 1 callers
Method
directRequest
directRequest modifies only req.URL so that it points to the upstream in the given DialInfo. It must modify ONLY the request URL.
modules/caddyhttp/reverseproxy/reverseproxy.go:1402
↓ 1 callers
Method
directive
directive collects tokens until the directive's scope closes (either end of line or end of curly brace block). It expects the currently-loaded token t
caddyconfig/caddyfile/parse.go:636
↓ 1 callers
Method
directives
directives parses through all the lines for directives and it expects the next token to be the first directive. It goes until EOF or closing curly bra
caddyconfig/caddyfile/parse.go:320
↓ 1 callers
Method
directoryListing
(ctx context.Context, fileSystem fs.FS, parentModTime time.Time, entries []fs.DirEntry, canGoUp bool, root, ur
modules/caddyhttp/fileserver/browsetplcontext.go:37
↓ 1 callers
Method
doActiveHealthCheck
doActiveHealthCheck performs a health check to upstream which can be reached at address hostAddr. The actual address for the request will be built acc
modules/caddyhttp/reverseproxy/healthchecks.go:391
↓ 1 callers
Function
doHttpCallWithRetries
(ctx caddy.Context, client *http.Client, request *http.Request)
caddyconfig/httploader.go:149
↓ 1 callers
Method
doSingleImport
doSingleImport lexes the individual file at importFile and returns its tokens or an error, if any.
caddyconfig/caddyfile/parse.go:588
↓ 1 callers
Function
downloadBuild
(qs url.Values)
cmd/packagesfuncs.go:280
↓ 1 callers
Function
encodeMatcherSet
(matchers map[string]caddyhttp.RequestMatcherWithError)
caddyconfig/httpcaddyfile/httptype.go:1625
↓ 1 callers
Method
encoderLevel
()
modules/caddyhttp/encode/zstd/zstd.go:139
↓ 1 callers
Method
endStream
()
modules/caddyhttp/reverseproxy/fastcgi/writer.go:73
↓ 1 callers
Method
enforcementHandler
enforcementHandler is an implicit middleware which performs standard checks before executing the HTTP middleware chain.
modules/caddyhttp/server.go:524
↓ 1 callers
Method
ensureConfigRunning
(rawConfig string, configType string)
caddytest/caddytest.go:212
↓ 1 callers
Function
errLogValues
errLogValues inspects err and returns the status code to use, the error log message, and any extra fields. If err is a HandlerError, the returned valu
modules/caddyhttp/logging.go:206
↓ 1 callers
Function
escapePathPlaceholders
(path string, r *http.Request, repl *caddy.Replacer)
modules/caddyhttp/rewrite/rewrite.go:307
↓ 1 callers
Function
escapePathPreservingSlashes
(path string)
modules/caddyhttp/rewrite/rewrite.go:328
↓ 1 callers
Method
evaluateGlobalOptionsBlock
evaluateGlobalOptionsBlock evaluates the global options block, which is expected to be the first server block if it has zero keys. It returns the upda
caddyconfig/httpcaddyfile/httptype.go:370
↓ 1 callers
Method
executeTemplate
executeTemplate executes the template contained in wb.buf and replaces it with the results.
modules/caddyhttp/templates/templates.go:483
↓ 1 callers
Method
extractNamedRoutes
extractNamedRoutes pulls out any named route server blocks so they don't get parsed as sites, and stores them in options for later.
caddyconfig/httpcaddyfile/httptype.go:460
↓ 1 callers
Function
fakeRequest
()
modules/caddyhttp/staticresp_test.go:60
← previous
next →
901–1,000 of 2,647, ranked by callers