Hello - I am integrating Apigee with a third party API and the problem I have run into is that the third party API returns a duplicate header "Expires". This causes Apigee to return a 500 response. I have tried removing headers before/after the request reaches the Target Endpoint but this does not work. In another thread somewhere else I found that the duplicate header issue is/was a blocker.
Unfortunately this means I cannot use the enterprise.apigee.com web interface to build my integration. The only way I can get this to work is by writing custom NodeJS code. I would prefer not to introduce anything custom and only use what the UI provides however it does not seem possible at this time. Is there a workaround for the Duplicate Header issue?
Solved! Go to Solution.
@GVoss The following property on the message-processor's http.properties need to be set:
HTTPHeader.Expires=allowDuplicates, multiValued
This would allow duplicates and multiple values for the expires header. If you are an on-premise customer you should be able to set this and restart the message processors. If you are a cloud customer, I would suggest you open a support ticket and they can help setting this up. Please note that this can only be done, if you have a "paid" account with enterprise.apigee.com
Please let me know, if this works for you.
@GVoss The following property on the message-processor's http.properties need to be set:
HTTPHeader.Expires=allowDuplicates, multiValued
This would allow duplicates and multiple values for the expires header. If you are an on-premise customer you should be able to set this and restart the message processors. If you are a cloud customer, I would suggest you open a support ticket and they can help setting this up. Please note that this can only be done, if you have a "paid" account with enterprise.apigee.com
Please let me know, if this works for you.
Thanks a lot for the reply! Generally speaking does this have to be done per-header or are there only a few headers where this causes a problem? Is there a doc here that outlines pros/cons of this configuration change? Thanks!
@GVoss This has to be done per header. However I think there's an config which says HTTPHeader.ANY which means this would get applied to all headers, but I am not sure that's advisable.
A lot of web servers do not like duplicate headers, so it can cause problems. So if you really want to allow it, I would suggest doing a specific override for each header than doing a generic change. That way you still have better control over the headers that you requested to be allowed. You can read about duplicate headers in the http RFC:
@arghya das
can you help in pointing out where I can make the above property change? Do I have to add a new message policy or can I access this variable as any system variable and change it in a JS policy
User | Count |
---|---|
7 | |
2 | |
2 | |
1 | |
1 |