Skip to content

Commit

Permalink
#226: CR changes
Browse files Browse the repository at this point in the history
  • Loading branch information
hwo-wd committed May 14, 2024
1 parent 52c221a commit 090701b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions roles/keycloak_quarkus/tasks/prereqs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,10 @@
quiet: true
fail_msg: "Providers definition is incorrect; `id` and one of `spi` or `url` are mandatory. `key` and `value` are mandatory for each property"
loop: "{{ keycloak_quarkus_providers }}"

- name: "Validate proxy-headers"
ansible.builtin.assert:
that:
- keycloak_quarkus_proxy_headers | lower in ['', 'forwarded', 'xforwarded']
quiet: true
fail_msg: "keycloak_quarkus_proxy_headers must be either '', 'forwarded' or 'xforwarded'"
4 changes: 2 additions & 2 deletions roles/keycloak_quarkus/templates/keycloak.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ cache-config-file=cache-ispn.xml
{% endif %}
{% endif %}

{% if keycloak_quarkus_proxy_headers is defined and keycloak_quarkus_proxy_headers != "none" %}
{% if keycloak_quarkus_proxy_headers | length > 0 %}
# Proxy
proxy-headers={{ keycloak_quarkus_proxy_headers }}
proxy-headers={{ keycloak_quarkus_proxy_headers | lower }}
{% elif keycloak_quarkus_proxy_mode is defined and keycloak_quarkus_proxy_mode != "none" %}
# Deprecated Proxy configuration
proxy={{ keycloak_quarkus_proxy_mode }}
Expand Down

0 comments on commit 090701b

Please sign in to comment.