Browse code

nathelper: docs for mode parameter for handle_ruri_alias()

Daniel-Constantin Mierla authored on 01/06/2021 07:29:10
Showing 1 changed files
... ...
@@ -794,17 +794,21 @@ if(is_rfc1918("$rd")) {
794 794
 
795 795
 	<section id="nathelper.f.handle_ruri_alias">
796 796
 		<title>
797
-		<function moreinfo="none">handle_ruri_alias()</function>
797
+		<function moreinfo="none">handle_ruri_alias([mode])</function>
798 798
 		</title>
799 799
 		<para>
800 800
 		Checks if the Request URI has an <quote>alias</quote>
801 801
 		parameter and if so, removes it and sets the <quote>$du</quote> based
802
-		on its value.  Note that this means that routing of request is based on 
803
-		<quote>;alias</quote> parameter value of the Request URI rather than 
802
+		on its value. Note that this means that routing of request is based on
803
+		<quote>;alias</quote> parameter value of the Request URI rather than
804 804
 		the Request URI itself. If you call <function>handle_ruri_alias()</function>
805 805
 		on a request, make sure that you screen the alias parameter value of
806
-		Request URI the same way as you would screen the
807
-		Request URI itself.
806
+		Request URI the same way as you would screen the Request URI itself.
807
+		</para>
808
+		<para>
809
+		The optional parameter mode can be 0 to consume first alias parameter,
810
+		otherwise it consumes the last alias parameter. If the parameter mode is
811
+		not provided, it consumes the first parameter.
808 812
 		</para>
809 813
 		<para>
810 814
 		Returns <emphasis>1</emphasis> if <quote>;alias</quote> parameter was