mirror of https://github.com/Aidaho12/haproxy-wi
				
				
				
			
							parent
							
								
									d0671d8a40
								
							
						
					
					
						commit
						6726b92617
					
				|  | @ -115,6 +115,10 @@ if form.getvalue('mode') is not None: | |||
| 			rewrite = form.getvalue('rewrite') | ||||
| 		else: | ||||
| 			rewrite = "" | ||||
| 		if form.getvalue('prefix'): | ||||
| 			prefix = form.getvalue('prefix') | ||||
| 		else: | ||||
| 			prefix = "" | ||||
| 		if form.getvalue('nocache'): | ||||
| 			nocache = form.getvalue('nocache') | ||||
| 		else: | ||||
|  | @ -127,7 +131,7 @@ if form.getvalue('mode') is not None: | |||
| 			dynamic = form.getvalue('dynamic') | ||||
| 		else: | ||||
| 			dynamic = "" | ||||
| 		cookie += " "+rewrite+" "+nocache+" "+postonly+" "+dynamic+"\n" | ||||
| 		cookie += " "+rewrite+" "+prefix+" "+nocache+" "+postonly+" "+dynamic+"\n" | ||||
| 		options_split += cookie | ||||
| 		if form.getvalue('dynamic'): | ||||
| 			options_split += "    dynamic-cookie-key " + form.getvalue('dynamic-cookie-key')+"\n" | ||||
|  |  | |||
|  | @ -86,14 +86,15 @@ | |||
| 				<span id="cookie_div" style="display: none;"> | ||||
| 					<input type="text" placeholder="name" name="cookie_name" id="cookie_name" class="form-control"><br><br> | ||||
| 					<input type="text" placeholder="domain" name="cookie_domain" class="form-control"><br><br> | ||||
| 					<select name="rewrite"> | ||||
| 						<option disabled selected>rewrite/insert/prefix/indirect</option> | ||||
| 					<select name="rewrite" id="rewrite" class="force_close"> | ||||
| 						<option disabled selected>rewrite/indirect/insert</option> | ||||
| 						<option>None</option> | ||||
| 						<option value="rewrite">rewrite</option> | ||||
| 						<option value="insert">insert</option> | ||||
| 						<option value="prefix">prefix</option> | ||||
| 						<option value="indirect">indirect</option> | ||||
| 						<option value="insert">insert</option> | ||||
| 					</select> | ||||
| 					<label for="prefix" style="margin-top: 5px;" title="This keyword indicates that instead of relying on a dedicated cookie for the persistence, an existing one will be completed.">prefix</label> | ||||
| 					<input type="checkbox" name="prefix" value="prefix" id="prefix"> | ||||
| 					<label for="nocache" style="margin-top: 5px;" title="This option is recommended in conjunction with the insert mode when there is a cache between the client and HAProxy.">nocache</label> | ||||
| 					<input type="checkbox" name="nocache" value="nocache" id="nocache"> | ||||
| 					<label for="postonly" style="margin-top: 5px;" title="This option ensures that cookie insertion will only be performed on responses to POST requests.">postonly</label> | ||||
|  | @ -322,14 +323,15 @@ | |||
| 				<span id="cookie_div2" style="display: none;"> | ||||
| 					<input type="text" placeholder="name" name="cookie_name" id="cookie_name2" class="form-control"><br><br> | ||||
| 					<input type="text" placeholder="domain" name="cookie_domain" class="form-control"><br><br> | ||||
| 					<select name="rewrite"> | ||||
| 						<option disabled selected>rewrite/insert/prefix/indirect</option> | ||||
| 					<select name="rewrite" id="rewrite2" class="force_close"> | ||||
| 						<option disabled selected>rewrite/indirect/insert</option> | ||||
| 						<option>None</option> | ||||
| 						<option value="rewrite">rewrite</option> | ||||
| 						<option value="insert">insert</option> | ||||
| 						<option value="prefix">prefix</option> | ||||
| 						<option value="indirect">indirect</option> | ||||
| 						<option value="insert">insert</option> | ||||
| 					</select> | ||||
| 					<label for="prefix2" style="margin-top: 5px;" title="This keyword indicates that instead of relying on a dedicated cookie for the persistence, an existing one will be completed.">prefix</label> | ||||
| 					<input type="checkbox" name="prefix" value="prefix" id="prefix2"> | ||||
| 					<label for="nocache2" style="margin-top: 5px;" title="This option is recommended in conjunction with the insert mode when there is a cache between the client and HAProxy.">nocache</label> | ||||
| 					<input type="checkbox" name="nocache" value="nocache" id="nocache2"> | ||||
| 					<label for="postonly2" style="margin-top: 5px;" title="This option ensures that cookie insertion will only be performed on responses to POST requests..">postonly</label> | ||||
|  |  | |||
|  | @ -480,6 +480,20 @@ $( function() { | |||
| 			$("#dynamic-cookie-key2" ).attr('required',false); | ||||
| 		} | ||||
| 	}); | ||||
| 	$( "#rewrite" ).on('selectmenuchange',function()  { | ||||
| 		if ($( "#rewrite option:selected" ).val() == "insert" || $( "#rewrite option:selected" ).val() == "rewrite") { | ||||
| 			$( "#prefix" ).checkboxradio( "disable" ); | ||||
| 		} else { | ||||
| 			$( "#prefix" ).checkboxradio( "enable" ); | ||||
| 		} | ||||
| 	}); | ||||
| 	$( "#rewrite2" ).on('selectmenuchange',function()  { | ||||
| 		if ($( "#rewrite2 option:selected" ).val() == "insert" || $( "#rewrite2 option:selected" ).val() == "rewrite") { | ||||
| 			$( "#prefix2" ).checkboxradio( "disable" ); | ||||
| 		} else { | ||||
| 			$( "#prefix2" ).checkboxradio( "enable" ); | ||||
| 		} | ||||
| 	}); | ||||
| 	$( "#dynamic" ).click( function(){ | ||||
| 		if ($('#dynamic').is(':checked')) { | ||||
| 			$("#dynamic-cookie-key" ).attr('required',true); | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Aidaho12
						Aidaho12