Skip to content

Commit

Permalink
added service id and service name headers when X-3scale-debug is used (
Browse files Browse the repository at this point in the history
…#987)

* added service id and service name headers when X-3scale-debug is used
https://issues.jboss.org/browse/THREESCALE-1849
  • Loading branch information
Carlo Palmieri authored and mikz committed Feb 11, 2019
1 parent cbbff5f commit b01e551
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Added

- Environment files now can use global `context` variable to share data [PR #964](https://github.com/3scale/apicast/pull/964)
- Adde sevice id and service name headers in debug context [PR #987](https://github.com/3scale/apicast/pull/987)

### Changed

Expand Down
2 changes: 2 additions & 0 deletions gateway/src/apicast/proxy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ local function output_debug_headers(service, usage, credentials)
ngx.header["X-3scale-credentials"] = credentials
ngx.header["X-3scale-usage"] = usage
ngx.header["X-3scale-hostname"] = ngx.var.hostname
ngx.header["X-3scale-service-id"] = service.id
ngx.header["X-3scale-service-name"] = service.serializable.system_name
end
end

Expand Down

0 comments on commit b01e551

Please sign in to comment.