Skip to content

Commit c8f3554

Browse files
committed
fix(utils): fix logic error in url validator
1 parent 03ecbde commit c8f3554

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/utils/url.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
const {isURL} = require('validator');
44
const endsWithGhost = /\/ghost\/?$/i;
55

6-
const validate = function validateURL(url, isAdmin) {
6+
const validate = function validateURL(url) {
77
const isValidURL = isURL(url, {require_protocol: true});
88
if (!isValidURL) {
99
return 'Invalid domain. Your domain should include a protocol and a TLD, E.g. http://my-ghost-blog.com';
1010
}
1111

12-
return (!isAdmin && !endsWithGhost.test(url)) || 'Ghost doesn\'t support running in a path that ends with `ghost`';
12+
return (!endsWithGhost.test(url)) || 'Ghost doesn\'t support running in a path that ends with `ghost`';
1313
};
1414

1515
const isCustomDomain = function isCustomDomain(input) {

0 commit comments

Comments
 (0)