added a input-field for setting 'fileHost'

Set this to avoid error-messages like 'proxy use not allowed / granted'
on accessing your Peer by its hostname.
pull/1/head
sixcooler 10 years ago
parent 421ee64f33
commit 33b0234454

@ -170,6 +170,12 @@ public class SettingsAck_p {
// server access
if (post.containsKey("serveraccount")) {
// fileHost
String fileHost = (post.get("fileHost")).trim();
if (fileHost != null && !fileHost.isEmpty() && !fileHost.equals(env.getConfig("fileHost", "localpeer"))) {
env.setConfig("fileHost", fileHost);
}
// static IP
String staticIP = (post.get("staticIP")).trim();
if (staticIP.startsWith("http://")) {

@ -3,7 +3,7 @@
<table border="0" cellspacing="5">
<tr valign="top">
<td>IP-Number filter:</td>
<td><input name="serverfilter" type="text" size="50" maxlength="1000" value="#[serverfilter]#" /><br />(requires restart)</td>
<td><input name="serverfilter" type="text" size="32" maxlength="1000" value="#[serverfilter]#" /><br />(requires restart)</td>
<td><strong>Here you can restrict access to the server.</strong> By default, the access is not limited,
because this function is needed to spawn the p2p index-sharing function.
If you block access to your server (setting anything else than '*'), then you will also be blocked
@ -46,6 +46,14 @@
If the value you enter here does not match with this IP,
you will not be able to access the server pages anymore.</td>
</tr>
<tr valign="top">
<td>fileHost:</td>
<td><input name="fileHost" type="text" size="32" maxlength="80" value="#[fileHost]#" /><br />(requires restart)</td>
<td><strong>Set this to avoid error-messages like 'proxy use not allowed / granted' on accessing your Peer by its hostname.</strong>
Virtual host for httpdFileServlet access for example http://FILEHOST/ shall access the file servlet and
return the defaultFile at rootPath either way, http://FILEHOST/ denotes the same as http://localhost:<port>/
for the preconfigured value 'localpeer', the URL is: http://localpeer/.</td>
</tr>
<tr valign="top">
<td colspan="3"><input type="submit" name="serveraccount" value="Submit" /></td>
</tr>

@ -77,6 +77,7 @@ public final class Settings_p {
prop.putHTML("peerName", sb.peers.mySeed().getName());
prop.putHTML("staticIP", env.getConfig("staticIP", ""));
prop.putHTML("fileHost", env.getConfig("fileHost", "localpeer"));
String peerLang = env.getConfig("locale.language", "default");
if (peerLang.equals("default")) peerLang = "en";
prop.putHTML("peerLang", peerLang);

Loading…
Cancel
Save