fix AH01328: Line too long
[via-proxy] / add-provider.pl
index e04e2d3..1d20bb3 100755 (executable)
@@ -3,7 +3,7 @@ use warnings;
 use strict;
 use autodie;
 
-my @domains = @ARGV;
+my @domains = map { s{^https://}{}; s{/+$}{}; $_ } @ARGV;
 
 open(my $fh, '>', "providers/$domains[0].conf");
 
@@ -31,9 +31,9 @@ print $fh qq{
        #Header edit* Set-Cookie "(.*)(?i:; *secure)" "\$1"
 };
 
+print $fh qq{# if there are problems, remove traling /\n};
 foreach ( @domains ) {
-       # for maximum compatibility, they should NOT end with /
-       print $fh qq{\tHeader edit* Location "https://$_" "https://$_.p.vbz.ffzg.hr"\n};
+       print $fh qq{\tHeader edit* Location "https://$_/" "https://$_.p.vbz.ffzg.hr/"\n};
 }
 
 print $fh qq{