Skip to content

Instantly share code, notes, and snippets.

@msavy msavy/example.java
Created Jul 4, 2018

Embed
What would you like to do?
/*
* (non-Javadoc)
* @see io.apiman.gateway.engine.policies.AbstractMappedPolicy#doProcessFailure(io.apiman.gateway.engine.beans.PolicyFailure, io.apiman.gateway.engine.policy.IPolicyContext, java.lang.Object, io.apiman.gateway.engine.policy.IPolicyFailureChain)
*/
@Override
protected void doProcessFailure(PolicyFailure failure, IPolicyContext context, CorsConfigBean config,
IPolicyFailureChain chain) {
System.out.println("In process failure");
failure.getHeaders().put("X-FROM-PROCESS-FAILURE", "Hello!");
CaseInsensitiveStringMultiMap corsHeaders = getResponseHeaders(context);
if(corsHeaders != EMPTY_MAP) {
failure.getHeaders().putAll(corsHeaders.toMap());
}
chain.doFailure(failure);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.