feat: support for cert based authentication

This commit is contained in:
2023-05-28 17:25:25 +02:00
parent 7567dbaa4b
commit 09c37b2a65
5 changed files with 35 additions and 1 deletions

View File

@@ -13,6 +13,12 @@ server{
listen 80;
listen [::]:80;
{% if cert_optional %}
ssl_client_certificate ca_cert.pem;
ssl_verify_client optional;
ssl_verify_depth 1;
{% endif %}
{% if extra_location %}
location {{ extra_location["location"] }} {
@@ -28,6 +34,7 @@ server{
proxy_pass http://{{ targetip }}:{{ targetport }};
proxy_set_header Host $http_host;
{{ proxy_pass_blob }}
{{ cert_header_line }}
{% if basicauth %}
auth_basic "{{ basicauth }}";
auth_basic_user_file /etc/nginx/{{ basicauth }}.htpasswd;