Skip to content

Commit

Permalink
Removing wildcard in the ansible role. Wildcards will have to be adde…
Browse files Browse the repository at this point in the history
…d when defining the variables
  • Loading branch information
Robin François authored and cedricwider committed Oct 21, 2024
1 parent 93bc053 commit b5427b3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ If you only want to install Caddy, you don't need to set any variables. If you w

* `additional_forwarding_ports`: Allows to define a list with additional ports where Caddy should listen for this domain and forward to HTTPS.
* `allowlist`: An array of IP addresses in CIDR-notation which are allowed to access this site (Optional). All other visitors receive a 404 error.
* `useragent_blocklist`: An array of User-Agents which are blocked to access this site (Optional).
* `useragent_blocklist`: An array of User-Agents which are blocked to access this site (Optional), wildcard characters (*) need to be used for broader matching.
* `certificate_file`: You can set this variable if you want to provide the certificate by yourself (Optional). The certificate needs permissions `0640`, with root as Owner and Caddy as Group.
* `certificate_key`: You can set this variable if you want to provide the certificate by yourself (Optional).
* `domain`: The domain caddy should listen to.
Expand Down
2 changes: 1 addition & 1 deletion molecule/reverse-proxy/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
allowlist:
- 8.8.8.8/32
useragent_blocklist:
- amazonbot
- "*amazonbot*"
additional_forwarding_ports:
- '8080'
- '1337'
Expand Down
2 changes: 1 addition & 1 deletion templates/Caddyfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{%- if site.useragent_blocklist is defined %}
@badbots {
{%- for ua in site.useragent_blocklist %}
header User-Agent *{{ ua }}*
header User-Agent {{ ua }}
{%- endfor %}
}

Expand Down

0 comments on commit b5427b3

Please sign in to comment.