<?php
# This file was automatically generated by the MediaWiki 1.19.0
# installer. If you make manual changes, please keep track in case you
# need to recreate them later.
#
# See includes/DefaultSettings.php for all configurable settings
# and their default values, but don't forget to make changes in _this_
# file, not there.
#
# Further documentation for configuration settings may be found at:
# http://www.mediawiki.org/wiki/Manual:Configuration_settings

# Protect against web entry
if ( !defined( 'MEDIAWIKI' ) ) {
	exit;
}

## Database settings
$wgDBname = "{{ archwiki_db }}";
$wgDBuser = "{{ archwiki_db_user }}";
$wgDBpassword = "{{ vault_archwiki_db_password }}";

$wgSecretKey = "{{ vault_archwiki_wg_secret_key }}";

# Site upgrade key. Must be set to a string (default provided) to turn on the
# web installer while LocalSettings.php is in place
$wgUpgradeKey = "{{ vault_archwiki_wg_upgrade_key }}";

$wgCaptchaQuestions = [
    'What is the output of "pacman -V|base32|head -1"' => trim(file_get_contents("{{ archwiki_question_answer_file }}"))
];

$wgSMTP = array(
 'host'     => "localhost", // could also be an IP address. Where the SMTP server is located
 'IDHost'   => "wiki.archlinux.org",      // Generally this will be the domain name of your website (aka mywiki.org)
 'port'     => 25,                 // Port to use when connecting to the SMTP server
 'auth'     => false,               // Should we use SMTP authentication (true or false)
 #'username' => "my_user_name",     // Username to use for SMTP authentication (if being used)
 #'password' => "my_password"       // Password to use for SMTP authentication (if being used)
);

$wgBounceHandlerInternalIPs = ["{{hostvars['mail.archlinux.org']['ipv4_address']}}", "{{hostvars['mail.archlinux.org']['ipv6_address']}}"];

# End of automatically generated settings.

# Add more configuration in the file included below.
require( "LocalSettings.archlinux.org.php" );

$wgVERPprefix = "wikibounce";
$wgDebugLogFile = "/dev/null";
$wgDebugLogGroups = array(
	'BounceHandler' => '/var/log/archwiki/bouncehandler.log',
	);

# memcached settings
$wgMainCacheType = CACHE_MEMCACHED;
$wgParserCacheType = CACHE_MEMCACHED;
$wgMessageCacheType = CACHE_MEMCACHED;
$wgMemCachedServers = [ "unix://{{ archwiki_memcached_socket }}:0" ];

# security headers
$wgReferrerPolicy = ["no-referrer-when-downgrade"];
$wgEditPageFrameOptions = "DENY";

## The URL base path to the directory containing the wiki;
## defaults for all runtime URL paths are based off of this.
## For more information on customizing the URLs
## (like /w/index.php/Page_title to /wiki/Page_title) please see:
## https://www.mediawiki.org/wiki/Manual:Short_URL
$wgScriptPath = "";
$wgArticlePath = "/title/$1";
# $wgUsePathInfo is not necessary: https://github.com/wikimedia/mediawiki/blob/bb92c4d1acc029eed0f6848360dff5b2436695fc/includes/WebRequest.php#L151-L153
#$wgUsePathInfo = true;
