Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
documentation:latest:extendedfunctions [2019/11/05 20:19]
cmaudoux [isInNet6]
documentation:latest:extendedfunctions [2019/11/05 20:41]
cmaudoux [varIsInUri]
Line 190: Line 190:
 ==== varIsInUri ==== ==== varIsInUri ====
  
-Function to check if a variable is in requested URI. Example //check if $uid is in /​check-auth ​URI///:+Function to check if a variable is in requested URI. Example //check if $uid is in /​check-auth/ ​URI//:
  
 <code perl> <code perl>
 varIsInUri($ENV{REQUEST_URI},​ '/​check-auth/',​ $uid) varIsInUri($ENV{REQUEST_URI},​ '/​check-auth/',​ $uid)
-</​code>​ 
  
-https://​test1.example.com/​check-auth/​dwho -> true+https://​test1.example.com/​check-auth/​dwho ​    ​-> true
 https://​test1.example.com/​check-auth/​dwho/​api -> true https://​test1.example.com/​check-auth/​dwho/​api -> true
-https://​test1.example.com/​check-auth/​dwh -> false+https://​test1.example.com/​check-auth/​dwh ​     -> false 
 +</​code>​
  
-You can set "​restricted"​ flag to match exact URI:+You can set "​restricted"​ flag to match exact URI:
  
 <code perl> <code perl>
 varIsInUri($ENV{REQUEST_URI},​ '/​check-auth/',​ "​$uid/",​ 1) varIsInUri($ENV{REQUEST_URI},​ '/​check-auth/',​ "​$uid/",​ 1)
-</​code>​ 
  
-https://​test1.example.com/​check-auth/​rtyler/​ -> true +https://​test1.example.com/​check-auth/​rtyler/ ​    ​-> true 
-https://​test1.example.com/​check-auth/​dwho/api -> false +https://​test1.example.com/​check-auth/​rtyler/api  -> false 
-https://​test1.example.com/​check-auth/​dwh -> false+https://​test1.example.com/​check-auth/​rtyler ​     ​-> false 
 +</​code>​