From 086ff6ce23fa0d07ed6fb3cd7f46f01f0c0fa54e Mon Sep 17 00:00:00 2001 From: mpw Date: Tue, 9 May 2023 14:39:23 -0300 Subject: [PATCH] remove bool condition to expose balance --- charts/hub-gateway/Chart.yaml | 2 +- charts/hub-gateway/plugins/credits.lua | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/charts/hub-gateway/Chart.yaml b/charts/hub-gateway/Chart.yaml index d2acd4f..8c11b38 100644 --- a/charts/hub-gateway/Chart.yaml +++ b/charts/hub-gateway/Chart.yaml @@ -19,7 +19,7 @@ type: application # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: "0.14.0" +version: "0.14.1" # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/hub-gateway/plugins/credits.lua b/charts/hub-gateway/plugins/credits.lua index 7d889be..037e79e 100644 --- a/charts/hub-gateway/plugins/credits.lua +++ b/charts/hub-gateway/plugins/credits.lua @@ -116,10 +116,8 @@ function _M.access(conf, ctx) end -- respond the credit balance to the user too - if conf.expose_credit_balance then - core.request.set_header(ctx, "X-Credit-Balance", data.balance) - core.response.set_header(ctx, "X-Credit-Balance", data.balance) - end + core.request.set_header(ctx, "X-Credit-Balance", data.balance) + core.response.set_header(ctx, "X-Credit-Balance", data.balance) end return _M