You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/07/31 12:01:32 UTC
[GitHub] [incubator-apisix] membphis edited a comment on pull request #1961: add apisix-version info to headers
membphis edited a comment on pull request #1961:
URL: https://github.com/apache/incubator-apisix/pull/1961#issuecomment-667084145
please take a look at this patch, @justinmclean :
```diff
diff --git a/apisix/init.lua b/apisix/init.lua
index 354290dc..e465a372 100644
--- a/apisix/init.lua
+++ b/apisix/init.lua
@@ -39,6 +39,7 @@ local load_balancer
local local_conf
local dns_resolver
local lru_resolved_domain
+local apisix_ver = "APISIX/" .. core.version.VERSION
local function parse_args(args)
@@ -299,6 +300,8 @@ function _M.http_access_phase()
core.ctx.set_vars_meta(api_ctx)
+ core.response.set_header("server", apisix_ver)
+
-- load and run global rule
if router.global_rules and router.global_rules.values
and #router.global_rules.values > 0 then
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org