parent
92c9d19e42
commit
c3430611cc
7 changed files with 75 additions and 36 deletions
@ -0,0 +1,4 @@ |
||||
{ |
||||
my $uri = "https://upload.$DomainName/"; |
||||
$DB->set_prop('dl', 'Uri', $uri); |
||||
} |
@ -0,0 +1,39 @@ |
||||
{ |
||||
|
||||
# Delete OpenUpload |
||||
if ( defined($conf->{'applicationList'}->{'010apps'}->{'openupload'}) ){ |
||||
delete $conf->{'exportedHeaders'}->{"upload.$domain"}; |
||||
delete $conf->{'locationRules'}->{"upload.$domain"}; |
||||
delete $conf->{'applicationList'}->{'010apps'}->{'openupload'}; |
||||
delete $conf->{'vhostOptions'}->{"upload.$domain"}; |
||||
} |
||||
|
||||
$conf->{'exportedHeaders'}->{"upload.$domain"} = { |
||||
'Auth-User' => '$uid', |
||||
'User-Email' => '$mail' |
||||
} unless ($conf->{'exportedHeaders'}->{"upload.$domain"}); |
||||
|
||||
$conf->{'locationRules'}->{"upload.$domain"} = { |
||||
'(?#10Auth)^/(admin|rest)\\.php' => '$groups =~ /\\badmins\\b/', |
||||
'default' => 'unprotect' |
||||
} unless ($conf->{'locationRules'}->{"upload.$domain"}); |
||||
|
||||
$conf->{'applicationList'}->{'010apps'}->{'dl'} = { |
||||
'options' => { |
||||
'logo' => 'dl.png', |
||||
'name' => 'Fichiers temporaires', |
||||
'description' => 'Service d\'hébergement de fichiers temporaires', |
||||
'uri' => "https://upload.$domain", |
||||
'display' => 'auto' |
||||
}, |
||||
'type' => 'application' |
||||
} unless ($conf->{'applicationList'}->{'010apps'}->{'dl'}); |
||||
|
||||
$conf->{'vhostOptions'}->{"upload.$domain"} = { |
||||
'vhostAliases' => "uploadapi.$domain", |
||||
} unless ($conf->{'vhostOptions'}->{"upload.$domain"}); |
||||
|
||||
|
||||
$OUT = ''; |
||||
|
||||
} |
@ -1,32 +0,0 @@ |
||||
{ |
||||
|
||||
$conf->{'exportedHeaders'}->{"upload.$domain"} = { |
||||
'Auth-User' => '$uid', |
||||
} unless ($conf->{'exportedHeaders'}->{"upload.$domain"}); |
||||
|
||||
$conf->{'locationRules'}->{"upload.$domain"} = { |
||||
'(?#21login)(a|action)=login' => "logout_app https://upload.$domain/", |
||||
'(?#13unprotect_captcha)^/plugins/captcha\\.php' => 'unprotect', |
||||
'(?#14unprotect_index)^/index\\.php$' => 'unprotect', |
||||
'(?#12unprotect_templates)^/templates/' => 'unprotect', |
||||
'(?#20logout)(a|action)=logout' => "logout_app https://auth.$domain", |
||||
'(?#10unprotect_dl)(a|action)=[dgr]' => 'unprotect', |
||||
'(?#01deny_double_action)(a|action)=.*(a|action)=.*' => 'deny', |
||||
'default' => '$groups =~ /\\b(equipe|admins)\\b/' |
||||
} unless ($conf->{'locationRules'}->{"upload.$domain"}); |
||||
|
||||
$conf->{'applicationList'}->{'010apps'}->{'openupload'} = { |
||||
'options' => { |
||||
'logo' => 'openupload.png', |
||||
'name' => 'Fichiers temporaires', |
||||
'description' => 'Service d\'hébergement de fichiers temporaires', |
||||
'uri' => "https://upload.$domain", |
||||
'display' => 'auto' |
||||
}, |
||||
'type' => 'application' |
||||
} unless ($conf->{'applicationList'}->{'010apps'}->{'openupload'}); |
||||
|
||||
|
||||
$OUT = ''; |
||||
|
||||
} |
Loading…
Reference in new issue