MCPcopy Create free account

hub / github.com/caddyserver/caddy / functions

Functions2,647 in github.com/caddyserver/caddy

↓ 1 callersMethodUnmarshalCaddyfile
(d *caddyfile.Dispenser)
modules/caddyfs/filesystem.go:89
↓ 1 callersMethodUnmarshalCaddyfile
UnmarshalCaddyfile sets up the handler from Caddyfile tokens. Syntax: intercept [<matcher>] { # intercept original responses @name {
modules/caddyhttp/intercept/intercept.go:226
↓ 1 callersMethodUnmarshalCaddyfile
UnmarshalCaddyfile deserializes Caddyfile tokens into h. transport http { read_buffer <size> write_buffer <size>
modules/caddyhttp/reverseproxy/caddyfile.go:1023
↓ 1 callersMethodUnmarshalCaddyfile
UnmarshalCaddyfile sets up the module from Caddyfile tokens. Syntax: journald { wrap <another encoder> } Example: log { format journal
modules/logging/journaldencoder.go:127
↓ 1 callersMethodUnmarshalJSON
(p []byte)
modules/caddytls/certselection.go:196
↓ 1 callersMethodUnregister
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 callersMethodUnwrap
Unwrap returns the underlying ResponseWriter, necessary for http.ResponseController to work correctly.
metrics.go:82
↓ 1 callersMethodUnwrap
Unwrap returns the underlying ResponseWriter, necessary for http.ResponseController to work correctly.
modules/caddyhttp/responsewriter.go:57
↓ 1 callersMethodValRaw
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 callersMethodValidate
Validate validates m's regular expressions.
modules/caddyhttp/matchers.go:1172
↓ 1 callersMethodVerifyClientCertificate
(rawCerts [][]byte, verifiedChains [][]*x509.Certificate)
modules/caddytls/connpolicy.go:1077
↓ 1 callersFunctionWasReplacedPlaceholderShorthand
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 callersMethodWithAttrs
(attrs []slog.Attr)
modules/caddyhttp/logging.go:315
↓ 1 callersMethodWithGroup
(name string)
modules/caddyhttp/logging.go:325
↓ 1 callersMethodWrapPacketConn
(net.PacketConn)
listeners.go:732
↓ 1 callersMethodWrite
(p []byte)
modules/caddyhttp/encode/encode_test.go:307
↓ 1 callersMethodWrite
(b []byte)
modules/caddyhttp/reverseproxy/httptransport.go:850
↓ 1 callersMethodWriteHeader
EXPERIMENTAL: Subject to change or removal.
modules/caddyhttp/intercept/intercept.go:112
↓ 1 callersMethodWriteHeader
(statusCode int)
modules/caddyhttp/templates/templates.go:524
↓ 1 callersMethodWriteHeader
WriteHeader intercepts calls by the stdlib to WriteHeader to instead write the HTTP status code we want.
modules/caddyhttp/fileserver/staticfiles.go:821
↓ 1 callersMethodactiveHealthChecker
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 callersMethodactiveHealthFails
activeHealthFails returns the number of consecutive active health check failures with the upstream.
modules/caddyhttp/reverseproxy/hosts.go:199
↓ 1 callersMethodactiveHealthPasses
activeHealthPasses returns the number of consecutive active health check passes with the upstream.
modules/caddyhttp/reverseproxy/hosts.go:194
↓ 1 callersMethodaddEdge
(from, to string)
caddyconfig/caddyfile/importgraph.go:55
↓ 1 callersMethodaddEdges
(from string, tos []string)
caddyconfig/caddyfile/importgraph.go:80
↓ 1 callersMethodaddEncoding
(e Encoding)
modules/caddyhttp/encode/encode.go:201
↓ 1 callersMethodaddNodes
(names []string)
caddyconfig/caddyfile/importgraph.go:39
↓ 1 callersMethodaddresses
()
caddyconfig/caddyfile/parse.go:210
↓ 1 callersFunctionadminPathAllowed
(reqPath, allowedPath string)
admin.go:725
↓ 1 callersFunctionallHeaderValues
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 callersFunctionappendUniqueStrings
(existing []string, additions ...string)
caddyconfig/httpcaddyfile/tlsapp.go:889
↓ 1 callersFunctionapplyServerOptions
applyServerOptions sets the server options on the appropriate servers
caddyconfig/httpcaddyfile/serveroptions.go:334
↓ 1 callersMethodapplySortAndLimit
(sortParam, orderParam, limitParam string, offsetParam string)
modules/caddyhttp/fileserver/browsetplcontext.go:219
↓ 1 callersMethodareConnected
(from, to string)
caddyconfig/caddyfile/importgraph.go:90
↓ 1 callersFunctionattemptHttpCall
(client *http.Client, request *http.Request)
caddyconfig/httploader.go:138
↓ 1 callersMethodautomaticHTTPSPhase1
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 callersMethodautomaticHTTPSPhase2
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 callersFunctionautomationPoliciesHaveCompatibleImplicitIssuers
automationPoliciesHaveCompatibleImplicitIssuers returns whether two policies without explicit issuers can be consolidated without changing default iss
caddyconfig/httpcaddyfile/tlsapp.go:1150
↓ 1 callersFunctionautomationPoliciesHaveSameIssuers
(a, b *caddytls.AutomationPolicy)
caddyconfig/httpcaddyfile/tlsapp.go:1131
↓ 1 callersFunctionautomationPolicyHasAllPublicNames
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 callersMethodbegin
()
caddyconfig/caddyfile/parse.go:146
↓ 1 callersMethodblockContents
()
caddyconfig/caddyfile/parse.go:293
↓ 1 callersFunctionbrokenUpstreamAddr
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 callersMethodbrowseApplyQueryParams
browseApplyQueryParams applies query parameters to the listing. It mutates the listing and may set cookies.
modules/caddyhttp/fileserver/browse.go:239
↓ 1 callersMethodbuildEnv
buildEnv returns a set of CGI environment variables for the request.
modules/caddyhttp/reverseproxy/fastcgi/fastcgi.go:257
↓ 1 callersMethodbuildPKIApp
( pairings []sbAddrAssociation, options map[string]any, warnings []caddyconfig.Warning, )
caddyconfig/httpcaddyfile/pkiapp.go:197
↓ 1 callersFunctionbuildQueryString
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 callersMethodbuildStandardTLSConfig
(ctx caddy.Context)
modules/caddytls/connpolicy.go:269
↓ 1 callersMethodbuildTLSApp
( pairings []sbAddrAssociation, options map[string]any, warnings []caddyconfig.Warning, )
caddyconfig/httpcaddyfile/tlsapp.go:36
↓ 1 callersMethodcanHazCertificate
canHazCertificate returns true if Tailscale reports it can get a certificate for the given ClientHello.
modules/caddytls/certmanagers.go:59
↓ 1 callersFunctioncelFileMatcherMacroExpander
()
modules/caddyhttp/fileserver/matcher.go:225
↓ 1 callersFunctioncelMatcherJSONMacroExpander
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 callersFunctioncelMatcherStringMacroExpander
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 callersMethodcheckHost
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 callersMethodcheckOrigin
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 callersFunctionchunked
Checks whether chunked is part of the encodings stack
modules/caddyhttp/reverseproxy/fastcgi/client.go:381
↓ 1 callersMethodcleanup
cleanup flush all remaining data and shutdown a tracerProvider
modules/caddyhttp/tracing/tracer.go:135
↓ 1 callersMethodcleanupConnections
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 callersMethodclearDeadline
()
listen.go:199
↓ 1 callersMethodclone
()
modules/caddyhttp/logging.go:157
↓ 1 callersFunctioncloneRequest
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 callersMethodcloseCurlyBrace
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 callersMethodcloseLogs
closeLogs cleans up resources allocated during openLogs. A successful call to openLogs calls this automatically when the context is canceled.
logging.go:208
↓ 1 callersMethodcompileEncodedMatcherSets
(sblock serverBlock)
caddyconfig/httpcaddyfile/httptype.go:1461
↓ 1 callersFunctioncomputeApproximateRequestSize
taken from https://github.com/prometheus/client_golang/blob/6007b2b5cae01203111de55f753e76d8dac1f529/prometheus/promhttp/instrument_server.go#L298
modules/caddyhttp/metrics.go:388
↓ 1 callersMethodconfigureServer
configureServer applies/binds the registered callback functions to the server.
modules/caddyhttp/server.go:705
↓ 1 callersMethodconsolidateAddrMappings
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 callersFunctionconsolidateAutomationPolicies
consolidateAutomationPolicies combines automation policies that are the same, for a cleaner overall output.
caddyconfig/httpcaddyfile/tlsapp.go:969
↓ 1 callersFunctionconsolidateConnPolicies
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 callersFunctioncontains
Helper function for string contains check
modules/caddytls/capools_test.go:983
↓ 1 callersMethodcopyBuffer
copyBuffer returns any write errors or non-EOF read errors, and the amount of bytes written.
modules/caddyhttp/reverseproxy/streaming.go:325
↓ 1 callersMethodcopyFromBackend
(errc chan<- error)
modules/caddyhttp/reverseproxy/streaming.go:647
↓ 1 callersMethodcorrectPassword
(account Account, plaintextPassword []byte)
modules/caddyhttp/caddyauth/basicauth.go:165
↓ 1 callersMethodcountHealthFail
countHealthFail mutates the recent failures count by delta. It returns an error if the adjustment fails.
modules/caddyhttp/reverseproxy/hosts.go:235
↓ 1 callersMethodcountHealthPass
countHealthPass mutates the recent passes count by delta. It returns an error if the adjustment fails.
modules/caddyhttp/reverseproxy/hosts.go:225
↓ 1 callersMethodcreateAutomationPolicies
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 callersFunctiondecInFlightRequest
(address string)
modules/caddyhttp/reverseproxy/reverseproxy.go:58
↓ 1 callersFunctiondecodeBase64DERCert
decodeBase64DERCert base64-decodes, then DER-decodes, certStr.
admin.go:1410
↓ 1 callersFunctiondecodeBase64DERCert
decodeBase64DERCert base64-decodes, then DER-decodes, certStr.
modules/caddyhttp/reverseproxy/httptransport.go:863
↓ 1 callersFunctiondetectConflictingSchemes
(srv *caddyhttp.Server, serverBlocks []serverBlock, options map[string]any)
caddyconfig/httpcaddyfile/httptype.go:1004
↓ 1 callersMethoddirectRequest
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 callersMethoddirective
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 callersMethoddirectives
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 callersMethoddirectoryListing
(ctx context.Context, fileSystem fs.FS, parentModTime time.Time, entries []fs.DirEntry, canGoUp bool, root, ur
modules/caddyhttp/fileserver/browsetplcontext.go:37
↓ 1 callersMethoddoActiveHealthCheck
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 callersFunctiondoHttpCallWithRetries
(ctx caddy.Context, client *http.Client, request *http.Request)
caddyconfig/httploader.go:149
↓ 1 callersMethoddoSingleImport
doSingleImport lexes the individual file at importFile and returns its tokens or an error, if any.
caddyconfig/caddyfile/parse.go:588
↓ 1 callersFunctiondownloadBuild
(qs url.Values)
cmd/packagesfuncs.go:280
↓ 1 callersFunctionencodeMatcherSet
(matchers map[string]caddyhttp.RequestMatcherWithError)
caddyconfig/httpcaddyfile/httptype.go:1625
↓ 1 callersMethodencoderLevel
()
modules/caddyhttp/encode/zstd/zstd.go:139
↓ 1 callersMethodendStream
()
modules/caddyhttp/reverseproxy/fastcgi/writer.go:73
↓ 1 callersMethodenforcementHandler
enforcementHandler is an implicit middleware which performs standard checks before executing the HTTP middleware chain.
modules/caddyhttp/server.go:524
↓ 1 callersMethodensureConfigRunning
(rawConfig string, configType string)
caddytest/caddytest.go:212
↓ 1 callersFunctionerrLogValues
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 callersFunctionescapePathPlaceholders
(path string, r *http.Request, repl *caddy.Replacer)
modules/caddyhttp/rewrite/rewrite.go:307
↓ 1 callersFunctionescapePathPreservingSlashes
(path string)
modules/caddyhttp/rewrite/rewrite.go:328
↓ 1 callersMethodevaluateGlobalOptionsBlock
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 callersMethodexecuteTemplate
executeTemplate executes the template contained in wb.buf and replaces it with the results.
modules/caddyhttp/templates/templates.go:483
↓ 1 callersMethodextractNamedRoutes
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 callersFunctionfakeRequest
()
modules/caddyhttp/staticresp_test.go:60
← previousnext →901–1,000 of 2,647, ranked by callers