* another router fix...

merge-requests/2/head
Dominika Liberda 2021-08-03 00:29:41 +02:00
parent 4845da7909
commit 4e49582099
1 changed files with 2 additions and 1 deletions

View File

@ -124,7 +124,8 @@ echo "$(date) - IP: ${r[ip]}, PROTO: ${r[proto]}, URL: ${r[url]}, GET_data: ${ge
if [[ ${r[status]} != 101 ]]; then
for (( i=0; i<${#route[@]}; i=i+3 )); do
if [[ "$(grep -Poh "^${route[$((i+1))]}$" <<< "${r[url]}")" != "" ]] || [[ "$(grep -Poh "^${route[$((i+1))]}$" <<< "${r[url]}/")" != "" ]]; then
clean_url="$(grep -Poh '.*?\?' <<< "${r[url]}")"
if [[ "$(grep -Poh "^${route[$((i+1))]}$" <<< "$clean_url")" != "" ]] || [[ "$(grep -Poh "^${route[$((i+1))]}$" <<< "$clean_url/")" != "" ]]; then
r[status]=212
r[view]="${route[$((i+2))]}"
IFS='/'