Class BrowserRequestOriginPolicy.Builder
java.lang.Object
com.revetsec.BrowserRequestOriginPolicy.Builder
- Enclosing class:
BrowserRequestOriginPolicy
@NotThreadSafe
@CheckReturnValue
public static final class BrowserRequestOriginPolicy.Builder
extends Object
Mutable, non-thread-safe browser-origin policy configuration.
- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptionAllows canonical plain-HTTP loopback origins for local development.allowMissingMetadata(@Nullable Boolean value) Allows an unsafe-method request with neither metadata header.build()Builds the immutable policy.
-
Method Details
-
allowInsecureLoopback
Allows canonical plain-HTTP loopback origins for local development. It never allows plain HTTP to a non-loopback host.nullrestores the secure default.- Parameters:
value- whether to allow plain-HTTP loopback origins- Returns:
- this builder
- Since:
- 1.0.0
-
allowMissingMetadata
Allows an unsafe-method request with neither metadata header. The resulting admission basis remains observable asBrowserRequestOriginResult.Basis.MISSING_METADATA_COMPATIBILITY.nullrestores the rejecting default.- Parameters:
value- whether to allow missing browser metadata- Returns:
- this builder
- Since:
- 1.0.0
-
build
Builds the immutable policy.- Returns:
- configured policy
- Since:
- 1.0.0
-