Skip to content
Permalink
Browse files
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
  • Loading branch information
BeneStem committed Nov 22, 2017
1 parent e871a00 commit a76432121ceca299a200d7fe30c4c4d644686d6b
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/components/settings/services/EditServiceForm.js
  2. +1 −1 src/models/Service.js
@@ -110,7 +110,7 @@ export default class EditServiceForm extends Component {
if (recipe.validateUrl && values.customUrl) {
this.setState({ isValidatingCustomUrl: true });
try {
values.customUrl = normalizeUrl(values.customUrl);
values.customUrl = normalizeUrl(values.customUrl, { stripWWW: false });
isValid = await recipe.validateUrl(values.customUrl);
} catch (err) {
console.warn('ValidateURL', err);
@@ -60,7 +60,7 @@ export default class Service {
if (this.recipe.hasCustomUrl && this.customUrl) {
let url;
try {
url = normalizeUrl(this.customUrl);
url = normalizeUrl(this.customUrl, { stripWWW: false });
} catch (err) {
console.error(`Service (${this.recipe.name}): '${this.customUrl}' is not a valid Url.`);
}

0 comments on commit a764321

Please sign in to comment.