diff --git a/README.md b/README.md index 28873a04..b997be63 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,8 @@ You also need to set the `KONG_CUSTOM_PLUGINS` environment variable | `config.bearer_only` | no | false | Only introspect tokens without redirecting | | `config.realm` | kong | false | Realm used in WWW-Authenticate response header | | `config.logout_path` | /logout | false | Absolute path used to logout from the OIDC RP | +| `config.http_proxy` || false | Http proxy url | +| `config.https_proxy` || false | https proxy url (only supports url format __http__://proxy and not __https__://proxy) | ### Enabling diff --git a/kong/plugins/oidc/schema.lua b/kong/plugins/oidc/schema.lua index ffb55b37..8fdd2dff 100644 --- a/kong/plugins/oidc/schema.lua +++ b/kong/plugins/oidc/schema.lua @@ -18,6 +18,8 @@ return { recovery_page_path = { type = "string" }, logout_path = { type = "string", required = false, default = '/logout' }, redirect_after_logout_uri = { type = "string", required = false, default = '/' }, + http_proxy = { type = "string", required = false, default = '' }, + https_proxy = { type = "string", required = false, default = '' }, filters = { type = "string" } } } diff --git a/kong/plugins/oidc/utils.lua b/kong/plugins/oidc/utils.lua index 2e3e661e..4c81514a 100644 --- a/kong/plugins/oidc/utils.lua +++ b/kong/plugins/oidc/utils.lua @@ -58,6 +58,10 @@ function M.get_options(config, ngx) filters = parseFilters(config.filters), logout_path = config.logout_path, redirect_after_logout_uri = config.redirect_after_logout_uri, + proxy_opts = { + http_proxy = config.http_proxy, + https_proxy = config.https_proxy + } } end