Fix conditionals in the liquid template for OpenID Connect conf.

This commit is contained in:
Subv 2020-05-23 12:55:47 -05:00 committed by Jamie Curnow
parent 9f2d3a1737
commit 87d9babbd3

View File

@ -1,4 +1,4 @@
{% if openidc_enabled -%}
{% if openidc_enabled == 1 or openidc_enabled == true -%}
access_by_lua_block {
local openidc = require("resty.openidc")
local opts = {
@ -18,7 +18,7 @@
ngx.exit(ngx.HTTP_INTERNAL_SERVER_ERROR)
end
{% if openidc_restrict_users_enabled -%}
{% if openidc_restrict_users_enabled == 1 or openidc_restrict_users_enabled == true -%}
local function contains(table, val)
for i=1,#table do
if table[i] == val then