X-Git-Url: http://git.rot13.org/?p=via-proxy;a=blobdiff_plain;f=add-provider.pl;h=28bbb95bffc8e20eddba16360de5b7bfd7bc29e1;hp=2695f002873c85f18c21d5fa94988e73132e1768;hb=5be3698f1a70d788c9986c206413db21964f57aa;hpb=26be5565df8880135cb9aac523ab8bce15724f14 diff --git a/add-provider.pl b/add-provider.pl index 2695f00..28bbb95 100755 --- a/add-provider.pl +++ b/add-provider.pl @@ -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}/ @@ -28,7 +32,8 @@ print $fh qq{ }; foreach ( @domains ) { - print $fh qq{\tHeader edit* Location "https://$_/" "https://$_.p.vbz.ffzg.hr/"\n}; + # for maximum compatibility, they should NOT end with / + print $fh qq{\tHeader edit* Location "https://$_" "https://$_.p.vbz.ffzg.hr"\n}; } print $fh qq{