X-Git-Url: http://git.rot13.org/?p=via-proxy;a=blobdiff_plain;f=add-provider.pl;h=1d20bb31a245ebca4d157ab20811e11ca25e5ed0;hp=13e9c102f86a43bf7beabe2a84d80fc0c886e494;hb=b421f75fb9029c9a6191ad585ac9a15516603f3b;hpb=79d4d947d0813ed65241e8a690a294e4dd8469bf diff --git a/add-provider.pl b/add-provider.pl index 13e9c10..1d20bb3 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}/ @@ -27,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{