MCPcopy Create free account

hub / github.com/caddyserver/caddy / functions

Functions2,647 in github.com/caddyserver/caddy

↓ 2 callersMethodgetCAFromAPIRequestPath
(r *http.Request)
modules/caddypki/adminapi.go:174
↓ 2 callersMethodgetConfigForName
(name string)
modules/caddytls/tls.go:853
↓ 2 callersMethodgetDatabaseKey
()
modules/caddypki/acmeserver/acmeserver.go:253
↓ 2 callersMethodgetEtagFromFile
Finds the first corresponding etag file for a given file in the file system and return its content
modules/caddyhttp/fileserver/staticfiles.go:777
↓ 2 callersFunctiongetFirstHostFromRoute
getFirstHostFromRoute traverses a route's matchers to find the Host rule. Since we are dealing with internally generated redirect routes, the host is
modules/caddyhttp/autohttps.go:893
↓ 2 callersFunctiongetHeaderFieldVals
getHeaderFieldVals returns the field values for the given fieldName from input. The host parameter should be obtained from the http.Request.Host field
modules/caddyhttp/matchers.go:1027
↓ 2 callersFunctiongetLastConfig
getLastConfig returns the last-known config file and adapter.
caddy.go:1281
↓ 2 callersMethodgetSTEK
getSTEK locks and loads the current STEK from storage. If none currently exists, a new STEK is created and persisted. If the current STEK is outdated
modules/caddytls/distributedstek/distributedstek.go:150
↓ 2 callersMethodhandleUpstreams
handleUpstreams reports the status of the reverse proxy upstream pool.
modules/caddyhttp/reverseproxy/admin.go:62
↓ 2 callersFunctionhasVaryValue
(hdr http.Header, target string)
modules/caddyhttp/encode/encode.go:480
↓ 2 callersFunctionhashCookie
hashCookie hashes (HMAC 256) some data with the secret
modules/caddyhttp/reverseproxy/selectionpolicies.go:770
↓ 2 callersMethodimplicitTailscaleManagersOnly
implicitTailscaleManagersOnly returns true if this policy is configured to serve only Tailscale names from the Tailscale manager at handshake-time.
modules/caddytls/automation.go:434
↓ 2 callersMethodinit
init should be called before we write a response, if rw.buf has contents.
modules/caddyhttp/encode/encode.go:446
↓ 2 callersFunctioninitAdminMetrics
()
admin_test.go:303
↓ 2 callersMethodinitServer
InitServer this will configure the server with a configurion of a specific type. The configType must be either "json" or the adapter type.
caddytest/caddytest.go:131
↓ 2 callersMethodinstallRoot
installRoot installs this CA's root certificate into the local trust store(s) if it is not already trusted. The CA must already be provisioned.
modules/caddypki/ca.go:436
↓ 2 callersFunctionisCaddyfile
(configFile, adapterName string)
cmd/main.go:112
↓ 2 callersFunctionisModuleMapType
isModuleMapType returns true if the type is map[string]json.RawMessage. It assumes that the string key is the module name, but this is not always the
modules.go:365
↓ 2 callersMethodisNextOnNewLine
isNextOnNewLine determines whether the current token is on a different line (higher line number) than the next token. It handles imported tokens corre
caddyconfig/caddyfile/dispenser.go:520
↓ 2 callersFunctionisSymlink
isSymlink return true if f is a symbolic link.
modules/caddyhttp/fileserver/browse.go:351
↓ 2 callersFunctionisTailscaleDomain
(name string)
caddyconfig/httpcaddyfile/tlsapp.go:1191
↓ 2 callersFunctionisTrustedClientIP
isTrustedClientIP returns true if the given IP address is in the list of trusted IP ranges.
modules/caddyhttp/server.go:1081
↓ 2 callersFunctionisWebsocket
isWebsocket returns true if r looks to be an upgrade request for WebSockets. It is a fairly naive check.
modules/caddyhttp/reverseproxy/streaming.go:565
↓ 2 callersMethodisWildcardOrDefault
isWildcardOrDefault determines if the subjects include any wildcard domains, or is the "default" policy (i.e. no subjects) which is unbounded.
modules/caddytls/automation.go:465
↓ 2 callersFunctionjournaldPriorityPrefix
(level zapcore.Level)
modules/logging/journaldencoder.go:178
↓ 2 callersFunctionleastRequests
leastRequests returns the host with the least number of active requests to it. If more than one host has the same least number of active requests, the
modules/caddyhttp/reverseproxy/selectionpolicies.go:805
↓ 2 callersMethodlistenerProtocolsWithDefaults
(lnProtocols []string)
modules/caddyhttp/server.go:936
↓ 2 callersFunctionlistenersUseAnyPortOtherThan
listenersUseAnyPortOtherThan returns true if there are any listeners in addresses that use a port which is not otherPort. Mostly borrowed from unexpor
caddyconfig/httpcaddyfile/httptype.go:1688
↓ 2 callersMethodlistenersUseAnyPortOtherThan
listenersUseAnyPortOtherThan returns true if there are any listeners in s that use a port which is not otherPort.
modules/caddyhttp/server.go:547
↓ 2 callersMethodloadModulesFromSomeMap
loadModulesFromSomeMap loads modules from val, which must be a type of map[string]any. Depending on inlineModuleKey, it will be interpreted as either
context.go:300
↓ 2 callersFunctionlowerExceptPlaceholders
lowerExceptPlaceholders lowercases s except within placeholders (substrings in non-escaped '{ }' spans). See https://github.com/caddyserver/caddy/issu
caddyconfig/httpcaddyfile/addresses.go:478
↓ 2 callersFunctionmakeArgsReplacer
makeArgsReplacer prepares a Replacer which can replace non-variadic args placeholders in imported tokens.
caddyconfig/caddyfile/importargs.go:98
↓ 2 callersMethodmakeRedirRoute
(redirToPort uint, matcherSet MatcherSet)
modules/caddyhttp/autohttps.go:544
↓ 2 callersFunctionmanageIdentity
manageIdentity sets up automated identity management for this server.
admin.go:461
↓ 2 callersMethodmapDirOpenError
mapDirOpenError maps the provided non-nil error from opening name to a possibly better non-nil error. In particular, it turns OS-specific errors about
modules/caddyhttp/fileserver/staticfiles.go:636
↓ 2 callersMethodmarshalBinary
marshalBinary writes this config to the cryptobyte builder. If there is an error, it will occur before any writes have happened.
modules/caddytls/ech.go:1042
↓ 2 callersMethodmask
(s string)
modules/logging/filters.go:257
↓ 2 callersFunctionmatchHeaders
matchHeaders returns true if input matches the criteria in against without regex. The host parameter should be obtained from the http.Request.Host fie
modules/caddyhttp/matchers.go:1041
↓ 2 callersFunctionmatchIPByCidrZones
(clientIP netip.Addr, zoneID string, cidrs []*netip.Prefix, zones []string)
modules/caddyhttp/ip_matchers.go:340
↓ 2 callersMethodmatches
(ip netip.Addr, ranges []netip.Prefix)
modules/caddytls/matchers.go:390
↓ 2 callersFunctionnewCert
(commonName, templateName string, lifetime time.Duration)
modules/caddypki/certificates.go:50
↓ 2 callersFunctionnewCloseOnCloseReader
(s string)
modules/caddyhttp/reverseproxy/retries_test.go:43
↓ 2 callersFunctionnewDefaultProductionLog
newDefaultProductionLog configures a custom log that is intended for use by default if no other log is specified in a config. It writes to stderr, use
logging.go:710
↓ 2 callersFunctionnewDefaultProductionLogEncoder
(wo WriterOpener)
logging.go:735
↓ 2 callersFunctionnewOpenTelemetryWrapper
newOpenTelemetryWrapper is responsible for the openTelemetryWrapper initialization using provided configuration.
modules/caddyhttp/tracing/tracer.go:45
↓ 2 callersFunctionnewSharedQUICState
newSharedQUICState creates a new sharedQUICState
listeners.go:530
↓ 2 callersFunctionnewVarsTestRequest
(t *testing.T, target string, headers http.Header, vars map[string]any)
modules/caddyhttp/vars_test.go:26
↓ 2 callersMethodnextGroup
()
caddyconfig/httpcaddyfile/httptype.go:1747
↓ 2 callersFunctionnormalizeDirPerm
normalizeDirPerm ensures that read bits also have execute bits set.
modules/logging/filewriter.go:299
↓ 2 callersFunctionnormalizeDirectiveName
normalizeDirectiveName ensures directives that should be sorted at the same level are named the same before sorting happens.
caddyconfig/httpcaddyfile/httptype.go:1402
↓ 2 callersMethodnormalizeRules
normalizeRules returns `nil` if policy is nil, the `Allow` and `Deny` rules are `nil`,
modules/caddypki/acmeserver/policy.go:67
↓ 2 callersFunctionnormalizeWebsocketHeaders
normalizeWebsocketHeaders ensures we use the standard casing as per RFC 6455, i.e. `WebSocket` with uppercase 'S'. Most servers don't care about this
modules/caddyhttp/reverseproxy/reverseproxy.go:746
↓ 2 callersMethodopenCurlyBrace
openCurlyBrace expects the current token to be an opening curly brace. This acts like an assertion because it returns an error if the token is not an
caddyconfig/caddyfile/parse.go:687
↓ 2 callersMethodopenResponseWriter
openResponseWriter creates a new response writer that may (or may not) encode the response with encodingName. The returned response writer MUST be clo
modules/caddyhttp/encode/encode.go:223
↓ 2 callersFunctionparseAdminListenAddr
parseAdminListenAddr extracts a singular listen address from either addr or defaultAddr, returning the network and the address of the listener.
admin.go:1391
↓ 2 callersFunctionparseCanonicalArrayIndex
(idx string)
admin.go:1139
↓ 2 callersFunctionparseEnvFile
parseEnvFile parses an env file from KEY=VALUE format. It's pretty naive. Limited value quotation is supported, but variable and command expansions ar
cmd/main.go:385
↓ 2 callersMethodparseIPRange
(str string)
modules/caddytls/matchers.go:371
↓ 2 callersFunctionparseIPZoneFromString
(address string)
modules/caddyhttp/ip_matchers.go:317
↓ 2 callersFunctionparseLevel
(levelInput string)
logging.go:751
↓ 2 callersFunctionparseLinkHeader
parseLinkHeader is responsible for parsing Link header and returning list of found resources. Accepted formats are: Link: <resource>; as=script Li
modules/caddyhttp/push/link.go:37
↓ 2 callersFunctionparseLogHelper
parseLogHelper is used both for the parseLog directive within Server Blocks, as well as the global "log" option for configuring loggers at the global
caddyconfig/httpcaddyfile/builtins.go:941
↓ 2 callersFunctionparseMatcherDefinitions
(d *caddyfile.Dispenser, matchers map[string]caddy.ModuleMap)
caddyconfig/httpcaddyfile/httptype.go:1537
↓ 2 callersFunctionparsePolicy
(name string)
modules/caddyhttp/proxyprotocol/policy.go:75
↓ 2 callersFunctionparseSegmentAsConfig
parseSegmentAsConfig parses the segment such that its subdirectives are themselves treated as directives, including named matcher definitions, and the
caddyconfig/httpcaddyfile/directives.go:356
↓ 2 callersFunctionparseVariadic
parseVariadic determines if the token is a variadic placeholder, and if so, determines the index range (start/end) of args to use. Returns a boolean s
caddyconfig/caddyfile/importargs.go:31
↓ 2 callersFunctionplaceholderShorthands
placeholderShorthands returns a slice of old-new string pairs, where the left of the pair is a placeholder shorthand that may be used in the Caddyfile
caddyconfig/httpcaddyfile/shorthands.go:53
↓ 2 callersFunctionprintEnvironment
()
cmd/main.go:452
↓ 2 callersMethodprocessQueryString
(s string)
modules/logging/filters.go:408
↓ 2 callersMethodprocessString
processString applies all regexp operations to a single string with input validation.
modules/logging/filters.go:800
↓ 2 callersMethodpromptForCredentials
(w http.ResponseWriter, err error)
modules/caddyhttp/caddyauth/basicauth.go:207
↓ 2 callersFunctionprovisionCidrsZonesFromRanges
(ranges []string)
modules/caddyhttp/ip_matchers.go:284
↓ 2 callersMethodprovisionCommon
(ctx Context, logging *Logging)
logging.go:342
↓ 2 callersFunctionprovisionContext
provisionContext creates a new context from the given configuration and provisions storage and apps. If `newCfg` is nil a new empty configuration will
caddy.go:484
↓ 2 callersMethodpublishECHConfigs
publishECHConfigs publishes any configs that are configured for publication and which haven't been published already.
modules/caddytls/ech.go:314
↓ 2 callersMethodpublishedSvcParams
(domain string, existing libdns.SvcParams, configListBin []byte)
modules/caddytls/ech.go:906
↓ 2 callersFunctionrandString
randString returns a string of n random characters. It is not even remotely secure OR a proper distribution. But it's good enough for some things. It
modules/caddyhttp/errors.go:90
↓ 2 callersFunctionreadConfig
readConfig traverses the current config to path and writes its JSON encoding to out.
caddy.go:280
↓ 2 callersMethodrecordAutoHTTPSRedirectAddress
recordAutoHTTPSRedirectAddress stores redirect destinations for one domain using a single winning port while keeping all bind addresses on that port.
modules/caddyhttp/autohttps.go:522
↓ 2 callersMethodrecordedAddrs
recordedAddrs returns a snapshot of all PROXY-header source addresses seen so far.
caddytest/integration/proxyprotocol_test.go:136
↓ 2 callersMethodregisterConnection
registerConnection holds onto conn so it can be closed in the event of a server shutdown. This is useful because hijacked connections or connections d
modules/caddyhttp/reverseproxy/streaming.go:383
↓ 2 callersFunctionremoveConnectionHeaders
removeConnectionHeaders removes hop-by-hop headers listed in the "Connection" header of h. See RFC 7230, section 6.1
modules/caddyhttp/reverseproxy/reverseproxy.go:1587
↓ 2 callersFunctionremoveTLSALPN
(srv *Server, target string)
modules/caddyhttp/app.go:425
↓ 2 callersMethodrenewCertsForCA
(ca *CA)
modules/caddypki/maintain.go:62
↓ 2 callersFunctionreplaceEnvVars
replaceEnvVars replaces all occurrences of environment variables. It mutates the underlying array and returns the updated slice.
caddyconfig/caddyfile/parse.go:69
↓ 2 callersFunctionreplaceRemoteAdminServer
replaceRemoteAdminServer replaces the running remote admin server according to the relevant configuration in cfg. It stops any previous remote admin s
admin.go:510
↓ 2 callersMethodresetHealth
resetHealth resets the health check counters.
modules/caddyhttp/reverseproxy/hosts.go:244
↓ 2 callersFunctionresolveIpVersion
(versions *IPVersions)
modules/caddyhttp/reverseproxy/upstreams.go:265
↓ 2 callersFunctionrootAndIntermediatePEM
(ca *CA)
modules/caddypki/adminapi.go:220
↓ 2 callersFunctionrootCertFromAdmin
rootCertFromAdmin makes the API request to fetch the root certificate for the named CA via admin API.
modules/caddypki/command.go:207
↓ 2 callersMethodrotateECHKeys
rotateECHKeys updates the ECH keys/configs that are outdated if rotation is needed. It should be called in a write lock on ech.configsMu. If a lock is
modules/caddytls/ech.go:190
↓ 2 callersMethodrotateKeys
rotateKeys rotates the keys of oldSTEK and returns the new distributedSTEK with updated keys and timestamps. It stores the returned STEK in storage, s
modules/caddytls/distributedstek/distributedstek.go:184
↓ 2 callersFunctionrun
run runs newCfg and starts all its apps if start is true. If any errors happen, cleanup is performed if any modules were provisioned; apps that were s
caddy.go:419
↓ 2 callersMethodselectFile
selectFile chooses a file according to m.TryPolicy by appending the paths in m.TryFiles to m.Root, with placeholder replacements.
modules/caddyhttp/fileserver/matcher.go:333
↓ 2 callersMethodserveHTTP
serveHTTP is the internal entry point for API requests. It may be called more than once per request, for example if a request is rewritten (i.e. inter
admin.go:812
↓ 2 callersFunctionsetAuthUserPlaceholders
(repl *caddy.Replacer, namespace string, user User)
modules/caddyhttp/caddyauth/caddyauth.go:126
↓ 2 callersMethodsetConfigsFromStorage
setConfigsFromStorage sets the ECH configs in memory to those in storage. It must be called in a write lock on ech.configsMu.
modules/caddytls/ech.go:148
↓ 2 callersFunctionsetupListenerWrapperTest
(t *testing.T, handlerFunc http.HandlerFunc)
caddytest/integration/listener_test.go:15
↓ 2 callersMethodshouldLogRequest
shouldLogRequest returns true if this request should be logged.
modules/caddyhttp/server.go:803
↓ 2 callersFunctionsplitModule
(arg string)
cmd/packagesfuncs.go:49
← previousnext →601–700 of 2,647, ranked by callers