Class PluginEndpoints
java.lang.Object
org.frontcache.plugin.host.PluginEndpoints
E2 Serve: the paths plugins own,
/fc-x/<id>/, and the challenge providers they offer.
The prefix is reserved
FrontCacheEngine.processRequest hands every request under "/fc-x/" here, after the guard rules and
before the cache - in server and filter mode alike. Such a request is never cached, never forwarded to the origin
and never a cache key; every answer carries Cache-Control: no-store. A path no started plugin owns answers
404, which is what a node without the plugin answers. A site whose origin serves pages under /fc-x/
loses them to this - the release note says so.
A plugin that fails is a plugin that is absent - for its own path only
Each plugin has a concurrency cap ("front-cache.plugins.%s.max-concurrent", default 32): over it,503 with Retry-After, without reaching the plugin. Its response is buffered
(CorePluginResponse), so one that throws - or writes more than the buffer - answers 503 and nothing
it began reaches the visitor; a body over "front-cache.plugins.%s.max-body" (default 64 KiB) answers 413. Every
answer is a request-log line whose is-cached column is plugin:<id> (plugin:none for a 404).-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA provider's plugin, and the cookies a pass from it may be under - what the guard's challenge needs. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic PluginEndpoints.ChallengeThe plugin offeringprovider- when one is started with an endpoint and the node can sign a pass.static booleanisReserved(String uri) static booleanWhether the plugins have been started (and not stopped) - before that no provider is known yet.static voidserve(RequestContext context, Predicate<String> redirectAllowed) Answers a request under "/fc-x/".
-
Field Details
-
PREFIX
- See Also:
-
-
Method Details
-
isReserved
- Returns:
- whether
uriis under the reserved prefix (/fc-xitself included)
-
isRunning
public static boolean isRunning()Whether the plugins have been started (and not stopped) - before that no provider is known yet. -
challenge
The plugin offeringprovider- when one is started with an endpoint and the node can sign a pass. Null otherwise: a challenge no one can pass must not be issued. -
serve
Answers a request under "/fc-x/". Never throws: whatever goes wrong is the plugin's path answering 503.- Parameters:
redirectAllowed- what a plugin's redirect target is checked against - the guard's own rule
-