projects
/
via-proxy
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
custom javascript handling
[via-proxy]
/
add-provider.pl
diff --git
a/add-provider.pl
b/add-provider.pl
index
13e9c10
..
1d20bb3
100755
(executable)
--- a/
add-provider.pl
+++ b/
add-provider.pl
@@
-3,7
+3,7
@@
use warnings;
use strict;
use autodie;
use strict;
use autodie;
-my @domains = @ARGV;
+my @domains =
map { s{^https://}{}; s{/+$}{}; $_ }
@ARGV;
open(my $fh, '>', "providers/$domains[0].conf");
open(my $fh, '>', "providers/$domains[0].conf");
@@
-18,6
+18,10
@@
print $fh qq{
ServerName ${domain}.p.vbz.ffzg.hr
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}/
SSLProxyEngine on
ProxyAddHeaders Off
ProxyPass / https://${domain}/
@@
-27,9
+31,9
@@
print $fh qq{
#Header edit* Set-Cookie "(.*)(?i:; *secure)" "\$1"
};
#Header edit* Set-Cookie "(.*)(?i:; *secure)" "\$1"
};
+print $fh qq{# if there are problems, remove traling /\n};
foreach ( @domains ) {
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{
}
print $fh qq{