mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-12 22:14:26 +00:00
fix(domains): reject non-HTTP URL schemes
This commit is contained in:
1 parent
74b1077010
commit
bce871d991
2 files changed
+51
-6
No files matched your search
@@ -18,5 +18,12 @@ it('accepts ordinary domains and URLs', function () {
|
||||
it('rejects strings that are not valid URLs', function () {
|
||||
expect(isValidDomainUrl('not a url'))->toBeFalse();
|
||||
expect(isValidDomainUrl('example.com'))->toBeFalse();
|
||||
expect(isValidDomainUrl('ht_tp://example.com'))->toBeFalse();
|
||||
expect(isValidDomainUrl(''))->toBeFalse();
|
||||
});
|
||||
|
||||
it('rejects URLs that do not use HTTP or HTTPS schemes', function () {
|
||||
expect(isValidDomainUrl('ftp://example.com'))->toBeFalse();
|
||||
expect(isValidDomainUrl('javascript://example.com'))->toBeFalse();
|
||||
expect(isValidDomainUrl('data://example.com'))->toBeFalse();
|
||||
});
|
||||
Reference in new issue
Block a user