Skip to content

Commit a764321

Browse files
committed
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
1 parent e871a00 commit a764321

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/components/settings/services/EditServiceForm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export default class EditServiceForm extends Component {
110110
if (recipe.validateUrl && values.customUrl) {
111111
this.setState({ isValidatingCustomUrl: true });
112112
try {
113-
values.customUrl = normalizeUrl(values.customUrl);
113+
values.customUrl = normalizeUrl(values.customUrl, { stripWWW: false });
114114
isValid = await recipe.validateUrl(values.customUrl);
115115
} catch (err) {
116116
console.warn('ValidateURL', err);

src/models/Service.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export default class Service {
6060
if (this.recipe.hasCustomUrl && this.customUrl) {
6161
let url;
6262
try {
63-
url = normalizeUrl(this.customUrl);
63+
url = normalizeUrl(this.customUrl, { stripWWW: false });
6464
} catch (err) {
6565
console.error(`Service (${this.recipe.name}): '${this.customUrl}' is not a valid Url.`);
6666
}

0 commit comments

Comments
 (0)