strip https:// and trailing slash from params
[via-proxy] / add-provider.pl
index 13e9c10..28bbb95 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");
 
@@ -18,6 +18,10 @@ print $fh qq{
 
        ServerName ${domain}.p.vbz.ffzg.hr
 
+       RewriteEngine on
+       # fix broken chunging
+       #RewriteRule    /common/javascript/extjs/ext-all.js     https://${domain}/common/javascript/extjs/ext-all.js [R,L]
+
        SSLProxyEngine on
        ProxyAddHeaders Off
        ProxyPass        / https://${domain}/