nginx_ua_block_pleroma_rejects: Put ~* directly in front of domain.

If there is a space between ~* and domain, nginx complains about “invalid number
of the map parameters”.
This commit is contained in:
tastytea 2019-08-17 22:22:30 +02:00
parent 767954ee17
commit 207a20bf93
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@
# Save the output to a file and include it in an nginx configuration file. Then
# add `if ($blockedagent) { return 403; }` to your server blocks.
# Version: 2019-08-17_1
# Version: 2019-08-17_2
function get_domains() # Outputs domains, separated by newline.
@ -23,7 +23,7 @@ function print_entry()
# Filter out wildcard domains.
if ! [[ "${domain}" =~ "\*" ]]; then
domain=$(sed 's/\./\\./g' <<<${domain})
echo " ~* ${domain} 1;"
echo " ~*${domain} 1;"
fi
}