Created
July 4, 2018 19:44
-
-
Save msavy/b872efa7f08929d19a420ea68ec3f584 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* (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