diff --git a/src/webui.cpp b/src/webui.cpp index 18b0239..40ccb70 100644 --- a/src/webui.cpp +++ b/src/webui.cpp @@ -429,6 +429,7 @@ WebUI::WebUI(Settings *settings, LED *statusLED, SysInfo *sysInfo, UpdateCheck * void WebUI::start() { httpd_config_t config = HTTPD_DEFAULT_CONFIG(); + config.lru_purge_enable = true; config.max_uri_handlers = 10; config.uri_match_fn = httpd_uri_match_wildcard; diff --git a/version.txt b/version.txt index afaf360..7f20734 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.0.0 \ No newline at end of file +1.0.1 \ No newline at end of file diff --git a/webui/src/settings.vue b/webui/src/settings.vue index 50d7f88..999415d 100644 --- a/webui/src/settings.vue +++ b/webui/src/settings.vue @@ -157,9 +157,13 @@ import { maxLength, numeric, ipAddress, - sameAs + sameAs, + helpers } from "vuelidate/lib/validators"; +const hostname = helpers.regex('hostname', /^[a-zA-Z0-9_-]{1,63}$/) +const domainname = helpers.regex('domainname', /^([a-zA-Z0-9_-]{1,63}\.)*[a-zA-Z0-9_-]{1,63}$/) + import VueI18n from "vue-i18n"; Vue.use(VueI18n); @@ -273,6 +277,7 @@ export default { }, hostname: { required, + hostname, maxLength: maxLength(32) }, localIP: { @@ -295,7 +300,8 @@ export default { ipAddress }, ntpServer: { - required: requiredIf("isNtpActived") + required: requiredIf("isNtpActived"), + domainname }, dcfOffset: { required: requiredIf("isDcfActived"), @@ -322,7 +328,7 @@ export default { this.$store .dispatch("settings/save", { adminPassword: self.adminPassword, - hostname: self.hostname + "2", + hostname: self.hostname, useDHCP: self.useDHCP, localIP: self.localIP, netmask: self.netmask,