* another fix in router

merge-requests/2/head
Dominika Liberda 2021-08-03 00:17:48 +02:00
parent d80ae05bfe
commit 4845da7909
1 changed files with 1 additions and 1 deletions

View File

@ -124,7 +124,7 @@ 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]}")" != "" ]] || [[ "${route[$((i+1))]}" == '/' && "${r[url]}" == '' ]]; then
if [[ "$(grep -Poh "^${route[$((i+1))]}$" <<< "${r[url]}")" != "" ]] || [[ "$(grep -Poh "^${route[$((i+1))]}$" <<< "${r[url]}/")" != "" ]]; then
r[status]=212
r[view]="${route[$((i+2))]}"
IFS='/'