File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 7171$ wgCdnServersNoPurge [] = '192.168.0.0/16 ' ; // 192.168.0.0 – 192.168.255.255
7272
7373# Auto-configuration for AWS extension QLOUD-122
74+ # Note: we usually don't have auto-configuration here, but there is no better place for this on Canasta
7475if ( !empty ( getenv ( 'AWS_IMAGES_BUCKET ' ) ) ) {
7576 // see https://github.com/edwardspec/mediawiki-aws-s3
7677 wfLoadExtension ( 'AWS ' );
9192 // for images to work in private mode, $wgUploadPath should point to img_auth.php
9293 if ( !empty ( getenv ( 'AWS_IMAGES_PRIVATE ' ) ) ) {
9394 $ wgFileBackends ['s3 ' ]['privateWiki ' ] = true ;
95+ // When private mode is enabled we MUST revok read right from anonymous users
96+ // and MUST configure img_auth.php setting, see QLOUD-124
97+ // NOTE: any possible overrides of these settings in any of the subsequently
98+ // loaded configs (config/settings/*.php) must be REMOVED
99+ $ wgGroupPermissions ['* ' ]['read ' ] = false ;
100+ $ wgUploadPath = "$ wgScriptPath/img_auth.php " ;
94101 }
95102 if ( !empty ( getenv ( 'AWS_IMAGES_ENDPOINT ' ) ) ) {
96103 $ wgFileBackends ['s3 ' ]['endpoint ' ] = getenv ( 'AWS_IMAGES_ENDPOINT ' );
You can’t perform that action at this time.
0 commit comments