Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Adding custom http headers to tRESTResponse

Is it possible to add custom http headers to a tRESTResponse? I know that there is an enhancement request for doing this and it is still not in progress of being worked on ( https://jira.talendforge.org/browse/TESB-6057). I would need this so that I can implement CORS. I do not wish to use JSONP since it would require more logic and be more of a "work-around".
Could I add http headers using tGroovy or tJavaFlex?
Labels (5)
3 Replies
Anonymous
Not applicable
Author

This enhancement has been implemented in version 5.2. See tRESTResponse/Advanced Settings to add manual http headers.
For CORS, just add the http header "Access-Control-Allow-Origin" with the value "*" to the tRESRResponse component.
Anonymous
Not applicable
Author

Dear Talend ESB Team,
Using last version of 5.6 in component TRestResponse and adding "Access-Control-Allow-Origin" with the value "*" , we still are getting the same CORS problem.
Do you know why header is not seen at http response?
 
Anonymous
Not applicable
Author

We restarted Runtime ESB and it worked.