Package org.forgerock.http.filter.cors
Interface CorsPolicyProvider
-
public interface CorsPolicyProviderACorsPolicyProviderallows theCorsFilterto lookup its configuration at runtime, also based on contextual information.It is the responsibility of the implementation to guarantee that the returned
CorsPolicymatch the providedorigin.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Optional<CorsPolicy>findApplicable(Context context, String origin)Returns an optional CORS policy applicable in thiscontext, for the givenorigin.
-
-
-
Method Detail
-
findApplicable
Optional<CorsPolicy> findApplicable(Context context, String origin)
Returns an optional CORS policy applicable in thiscontext, for the givenorigin.If the implementation cannot make a choice if multiple policies would be applicable, it is expected to log a message and return an empty
Optional.- Parameters:
context- Runtime context (never null)origin- Origin header value (never null)- Returns:
- an optional policy that can be applied to the origin, or empty.
-
-