Class EffectiveOriginResolver

java.lang.Object
com.soklet.EffectiveOriginResolver

@NotThreadSafe public final class EffectiveOriginResolver extends Object
Resolves a client's effective origin (scheme + host + optional port) from request headers.

Forwarded headers can be spoofed if Soklet is reachable directly. Choose a EffectiveOriginResolver.TrustPolicy that matches your deployment and, for EffectiveOriginResolver.TrustPolicy.TRUST_PROXY_ALLOWLIST, provide a trusted proxy predicate or allowlist. If the remote address is missing or not trusted, forwarded headers are ignored.

Extraction order is: trusted forwarded headers → Host → (optional) Origin fallback. Origin never overrides a conflicting host value; it only fills missing scheme/port or supplies host when absent.

Defaults: if allowOriginFallback(Boolean) is left unset, Origin fallback is enabled only for EffectiveOriginResolver.TrustPolicy.TRUST_ALL; otherwise it is disabled.