aboutsummaryrefslogtreecommitdiff
path: root/js/redirect.js
diff options
context:
space:
mode:
authorEinar Egilsson <einar@einaregilsson.com>2020-02-06 08:50:54 +0000
committerGitHub <noreply@github.com>2020-02-06 08:50:54 +0000
commit6a12784be0ac4759e92580c01ac8bfd7f91c4f1f (patch)
treef3ffb68b0dc9fec398031bb1500e9d1dedc0d465 /js/redirect.js
parent7a1c186b14fae578940f319a338f22b962316a41 (diff)
parent0453e5bdc580fd456e010bf7a37d88121675aa27 (diff)
Merge pull request #177 from Gitoffthelawn/patch-10
Removed code preventing saving many types of valid redirects
Diffstat (limited to 'js/redirect.js')
-rw-r--r--js/redirect.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/js/redirect.js b/js/redirect.js
index b902da2..2800044 100644
--- a/js/redirect.js
+++ b/js/redirect.js
@@ -158,11 +158,13 @@ Redirect.prototype = {
return;
}
- if (match.isMatch && !match.redirectTo.match(/^https?\:\/\//)) {
- this.error = 'The redirect result must start with http:// or https://, current result is: ' + match.redirectTo;
- return;
- }
- if (!match.isMatch) {
+ //Commented out because this code prevents saving many types of valid redirects.
+ //if (match.isMatch && !match.redirectTo.match(/^https?\:\/\//)) {
+ // this.error = 'The redirect result must start with http:// or https://, current result is: "' + match.redirectTo;
+ // return;
+ //}
+
+ if (!match.isMatch) {
this.error = 'The include pattern does not match the example url.';
return;
}