make https port setting changeable via front end somewhere

(chosen Http Networking page /Settings_p.html?page=http )
pull/1/head
reger 11 years ago
parent 698f053658
commit c3e40c82fe

@ -183,6 +183,10 @@
<p class="error">Invalid maximum file size for http crawler: <tt>#[crawler.http.maxFileSize]#</tt></p>
::<!-- 31: Cralwer settings, maxFtpFileSize error -->
<p class="error">Invalid maximum file size for ftp crawler: <tt>#[crawler.http.maxFileSize]#</tt></p>
::<!-- 32: https port setting changed -->
<p>HTTPS port is now: <span class="settingsValue">#[port.ssl]#</span></p>
<p>the change will take effect after restart.</p>
<p>Note: the SSL option must be switched on, see <a href="ConfigBasic.html">Basic Configuration</a></p>
#(/info)#
<p>You can now go back to the <a href="#[referer]#">Settings</a> page if you want to make more changes.</p>
#%env/templates/footer.template%#

@ -503,6 +503,16 @@ public class SettingsAck_p {
return prop;
}
// change https port
if (post.containsKey("port.ssl")) {
int port = post.getInt("port.ssl", 8443);
if (port > 0 && port != env.getConfigInt("port", 8090)) {
env.setConfig("port.ssl", port);
}
prop.put("info_port.ssl", port);
prop.put("info", "32");
return prop;
}
// nothing made
prop.put("info", "1");//no information submitted

@ -24,12 +24,12 @@
<td>Specifies if the proxy should send the X-Forwarded-For http header.</td>
</tr>
<tr valign="top">
<td colspan="3"><input type="submit" name="httpNetworking" value="Submit" /> <em>Changes will take effect immediately.</em></td>
<td colspan="3"><input type="submit" class="btn-primary btn-sm" name="httpNetworking" value="Submit" /> <em>Changes will take effect immediately.</em></td>
</tr>
</table>
</fieldset>
</form><br />
<form>
<form action="SettingsAck_p.html">
<fieldset><legend id="httpserver">HTTP Server</legend>
<table border="0" cellspacing="5">
<tr>
@ -37,9 +37,15 @@
<td><b>#[httpservername]#</b></td>
</tr>
<tr>
<td>HTTP Server Port:</td>
<td><a href="ConfigBasic.html">HTTP Server Port</a>:</td>
<td><b>#[port]#</b></td>
</tr>
#(server.https)#::
<tr>
<td>HTTPS Port:</td>
<td><input type="text" width="4" name="port.ssl" value="#[port.ssl]#" size="4" maxlength="6"/>&nbsp;<input class="btn-primary btn-xs" type="submit" value="change"/></td>
</tr>
#(/server.https)#
</table>
</fieldset>
</form><br />

@ -185,7 +185,10 @@ public final class Settings_p {
prop.putHTML("crawler.smb.maxFileSize",sb.getConfig("crawler.smb.maxFileSize", "-1"));
prop.putHTML("crawler.file.maxFileSize",sb.getConfig("crawler.file.maxFileSize", "-1"));
// http server info
prop.put("httpservername",sb.getHttpServer().getVersion());
prop.put("server.https",sb.getConfigBool("server.https", false));
prop.put("server.https_port.ssl", sb.getConfig("port.ssl","8443"));
// return rewrite properties
return prop;

Loading…
Cancel
Save