1 |
diff -urN smeserver-tt-rss-0.5.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90tt-rss smeserver-tt-rss-0.5.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90tt-rss |
2 |
--- smeserver-tt-rss-0.5.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90tt-rss 2021-05-12 19:13:49.000000000 +0400 |
3 |
+++ smeserver-tt-rss-0.5.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90tt-rss 2022-06-30 19:56:43.612000000 +0400 |
4 |
@@ -3,13 +3,11 @@ |
5 |
if ((${'tt-rss'}{'status'} || 'enabled') eq 'enabled'){ |
6 |
|
7 |
my $alias = ((${'tt-rss'}{'AliasOnPrimary'} || 'enabled') eq 'enabled' ) ? 'Alias /tt-rss /usr/share/tt-rss':''; |
8 |
- my $allow = ((${'tt-rss'}{'access'} || 'private') eq 'public') ? 'all':"$localAccess $externalSSLAccess"; |
9 |
+ my $allow = ((${'tt-rss'}{'access'} || 'private') eq 'public') ? 'all granted':"ip $localAccess $externalSSLAccess"; |
10 |
my $auth = ((${'tt-rss'}{'Authentication'} || 'http') eq 'http') ? "AuthName \"Tiny Tiny RSS\"\n" . |
11 |
" AuthType Basic\n" . |
12 |
" AuthBasicProvider external\n" . |
13 |
- " AuthExternal pwauth\n" . |
14 |
- " Require valid-user\n" : ''; |
15 |
- |
16 |
+ " AuthExternal pwauth\n" : ''; |
17 |
my $php =<<'_EOF'; |
18 |
AddType application/x-httpd-php .php |
19 |
<FilesMatch \.php$> |
20 |
@@ -22,16 +20,27 @@ |
21 |
$alias |
22 |
|
23 |
<Directory /usr/share/tt-rss> |
24 |
-$php |
25 |
+ $php |
26 |
SSLRequireSSL on |
27 |
- Order deny,allow |
28 |
- Deny from all |
29 |
- Allow from $allow |
30 |
- $auth |
31 |
+_EOF |
32 |
+ |
33 |
+ if ( $auth ) { |
34 |
+ $OUT .= " $auth\n" . |
35 |
+ " <RequireAll>\n" . |
36 |
+ " Require $allow\n" . |
37 |
+ " Require valid-user\n" . |
38 |
+ " </RequireAll>\n"; |
39 |
+ } else { |
40 |
+ $OUT .= "Require $allow\n"; |
41 |
+ } |
42 |
+ |
43 |
+ $OUT .=<<_EOF; |
44 |
</Directory> |
45 |
+ |
46 |
<Directory /usr/share/tt-rss/schema> |
47 |
- deny from all |
48 |
+ Require all denied |
49 |
</Directory> |
50 |
+ |
51 |
_EOF |
52 |
} |
53 |
else{ |