{"action":"closed","issue":{"url":"https://api.github.com/repos/Mashape/kong/issues/1780","repository_url":"https://api.github.com/repos/Mashape/kong","labels_url":"https://api.github.com/repos/Mashape/kong/issues/1780/labels{/name}","comments_url":"https://api.github.com/repos/Mashape/kong/issues/1780/comments","events_url":"https://api.github.com/repos/Mashape/kong/issues/1780/events","html_url":"https://github.com/Mashape/kong/issues/1780","id":185938740,"number":1780,"title":"Replace output before passing on using regex","user":{"login":"danielvijge","id":1246723,"avatar_url":"https://avatars.githubusercontent.com/u/1246723?v=3","gravatar_id":"","url":"https://api.github.com/users/danielvijge","html_url":"https://github.com/danielvijge","followers_url":"https://api.github.com/users/danielvijge/followers","following_url":"https://api.github.com/users/danielvijge/following{/other_user}","gists_url":"https://api.github.com/users/danielvijge/gists{/gist_id}","starred_url":"https://api.github.com/users/danielvijge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielvijge/subscriptions","organizations_url":"https://api.github.com/users/danielvijge/orgs","repos_url":"https://api.github.com/users/danielvijge/repos","events_url":"https://api.github.com/users/danielvijge/events{/privacy}","received_events_url":"https://api.github.com/users/danielvijge/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-28T14:33:43Z","updated_at":"2016-11-17T20:31:02Z","closed_at":"2016-11-17T20:31:02Z","body":"Is it possible to find-and-replace parts of the response before sending it on? Not just completely a json key, but do something smarter with regex replace.\n\nFor example, lets say Kong is proxying the Facebook Graph API. The response contains the JSON keys paging.previous and paging.next with URLs the get the next set of results. These URLs include the full domain. Obviously, if Kong is in front of Facebook, the URL for Kong is different. The previous and next URL should then also be Kong proxied URLs.\n\nI have done some hacking on the response-transformer plugin, and added a config.replace.body[] parameter. This can contain a regex pattern/replace, so it is very flexible in what you can replace with it. However, I am not sure this is the correct solution, and if this would be a desired feature for Kong.\n"}}
{"actor":{"display_login":"thibaultcha"}}