Skip to content

Commit

Permalink
Adding converge and Caddyfile.expected examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin François committed Sep 5, 2024
1 parent db40194 commit 32409cb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions molecule/reverse-proxy/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
code: 401
allowlist:
- 8.8.8.8/32
useragent_blocklist:
- amazonbot
additional_forwarding_ports:
- '8080'
- '1337'
Expand Down
8 changes: 8 additions & 0 deletions molecule/reverse-proxy/files/Caddyfile.expected
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@


example.com {
@badbots {
header User-Agent *amazonbot*
}

handle @badbots {
abort
}

@allowlist {
remote_ip 8.8.8.8/32
}
Expand Down
1 change: 0 additions & 1 deletion templates/Caddyfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

{% for site in caddy_sites %}
{{ site.domain }} {

{% if site.useragent_blocklist is defined %}
@badbots {
{% for ua in site.useragent_blocklist %}
Expand Down

0 comments on commit 32409cb

Please sign in to comment.