Skip to content

Commit

Permalink
Do not strip www from custom urls
Browse files Browse the repository at this point in the history
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 a764321
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/settings/services/EditServiceForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/models/Service.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.`);
}
Expand Down

0 comments on commit a764321

Please sign in to comment.