aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar Benedikt Stemmildt <benedikt@stemmildt.com>2017-11-22 20:34:20 +0100
committerLibravatar Benedikt Stemmildt <benedikt@stemmildt.com>2017-11-22 20:44:57 +0100
commita76432121ceca299a200d7fe30c4c4d644686d6b (patch)
tree55929b750e2ae650a6adcc3bf40e7af214b77d06 /src
parentreplace typeform (diff)
downloadferdium-app-a76432121ceca299a200d7fe30c4c4d644686d6b.tar.gz
ferdium-app-a76432121ceca299a200d7fe30c4c4d644686d6b.tar.zst
ferdium-app-a76432121ceca299a200d7fe30c4c4d644686d6b.zip
Do not strip www from custom urls
Stripping www from the custom url causes some custom services to fail. When there is no domain without www loading is not possible. Resolves: #325
Diffstat (limited to 'src')
-rw-r--r--src/components/settings/services/EditServiceForm.js2
-rw-r--r--src/models/Service.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/components/settings/services/EditServiceForm.js b/src/components/settings/services/EditServiceForm.js
index 9b359a78e..23f5399f7 100644
--- a/src/components/settings/services/EditServiceForm.js
+++ b/src/components/settings/services/EditServiceForm.js
@@ -110,7 +110,7 @@ export default class EditServiceForm extends Component {
110 if (recipe.validateUrl && values.customUrl) { 110 if (recipe.validateUrl && values.customUrl) {
111 this.setState({ isValidatingCustomUrl: true }); 111 this.setState({ isValidatingCustomUrl: true });
112 try { 112 try {
113 values.customUrl = normalizeUrl(values.customUrl); 113 values.customUrl = normalizeUrl(values.customUrl, { stripWWW: false });
114 isValid = await recipe.validateUrl(values.customUrl); 114 isValid = await recipe.validateUrl(values.customUrl);
115 } catch (err) { 115 } catch (err) {
116 console.warn('ValidateURL', err); 116 console.warn('ValidateURL', err);
diff --git a/src/models/Service.js b/src/models/Service.js
index 484252e7c..93061c2cf 100644
--- a/src/models/Service.js
+++ b/src/models/Service.js
@@ -60,7 +60,7 @@ export default class Service {
60 if (this.recipe.hasCustomUrl && this.customUrl) { 60 if (this.recipe.hasCustomUrl && this.customUrl) {
61 let url; 61 let url;
62 try { 62 try {
63 url = normalizeUrl(this.customUrl); 63 url = normalizeUrl(this.customUrl, { stripWWW: false });
64 } catch (err) { 64 } catch (err) {
65 console.error(`Service (${this.recipe.name}): '${this.customUrl}' is not a valid Url.`); 65 console.error(`Service (${this.recipe.name}): '${this.customUrl}' is not a valid Url.`);
66 } 66 }