* fix in router

This commit is contained in:
Dominika Liberda 2021-02-18 00:39:26 +01:00
parent 27a6dfd5ed
commit 610908cdf2

View file

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