feat(api-key): Use Connector Config to permit specified header(s)
MODIFY
apikey-policy/src/main/java/io/apiman/plugins/apikey_policy/ApiKeyPolicy.java
apikey-policy/src/main/java/io/apiman/plugins/apikey_policy/ApiKeyPolicy.java
@@ -50,6 +50,8 @@ public class ApiKeyPolicy extends AbstractMappedPolicy<ApiKeyConfigBean> {
if (request.getApiKey() != null) {
String header = config.getRequestHeader();
request.getHeaders().put(header, request.getApiKey());
+ // Ensure that connector does not strip the header out (e.g. X-Api-Key)
+ context.getConnectorConfiguration().permitRequestHeader(header);
}
super.doApply(request, context, config, chain);
}

feat(api-key): Use Connector Config to permit specified header(s)