mirror of
https://github.com/ai-robots-txt/ai.robots.txt.git
synced 2025-05-19 08:43:11 +00:00
Added Test and Docu
This commit is contained in:
parent
e519f9f94c
commit
1e92364c13
5 changed files with 19 additions and 57 deletions
|
@ -180,7 +180,7 @@ def json_to_nginx(robot_json):
|
|||
|
||||
def json_to_caddy(robot_json):
|
||||
caddyfile = "@aibots {\n "
|
||||
caddyfile += "\n ".join(f'header User-Agent "*{k}*"' for k in robot_json.keys())
|
||||
caddyfile += f' header_regexp User-Agent "{list_to_pcre(robot_json.keys())}"'
|
||||
caddyfile += "\n}"
|
||||
return caddyfile
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue