Imported Google Group message.
Sender:Ian Harris
.
Date:Thursday, 22 October 2015 16:51:51 UTC+1.
Hi Martin,
That looks like it will do the trick. I’ve been having a look at some of the examples for the custom_middleware.
Am I right in thinking that I should be configuring the “response” entry of the middleware - as opposed to pre or post?
Would it suffice to remove all Access-Control-Accept-Origin headers and then re-add all in the same js script?
Thanks,
Ian.
On Thursday, October 22, 2015 at 3:19:19 PM UTC+1, Martin Buhr wrote:
Hi Ian,
Yes it is possible to remove the headers, you can try to use the HTTP Header transform middleware plugin to remove the response header, since our CORS middleware writes directly to the TCP stream before the proxy copies in the response, it should work.
Cheers,
Martin
On Thu, Oct 22, 2015 at 3:16 PM, Ian Harris wrote:
Hi Martin,
Definitely in my testing it is then because I was using httpbin in my tests. Our CTO has been testing against some other APIs I’ll check with him. Is is possible to remove the repeated headers in Tyk or do we need to disable CORS on the target API?
Thanks,
Ian.
On Thursday, October 22, 2015 at 2:13:37 PM UTC+1, Martin Buhr wrote:
Hi Ian,
Is the upstream app adding CORS headers? We noticed this happening when testing against httpbin, which adds it’s own headers which then unfortunately get duplicated.
Cheers,
Martin
–
You received this message because you are subscribed to the Google Groups “Tyk Community Support” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web, visit https://groups.google.com/d/msgid/tyk-community-support/b408501a-88c9-47db-a2ab-ed5ab86bc788%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.