Topic on Project:Support desk

Visual Editor on a password protected site

1
Summary last edited by Ernstkm 11:14, 14 January 2024 3 months ago
Warning Warning: Using the method prescribed below will leave your wiki open to access from unauthenticated users, by merely setting the User-Agent on their request. It would be inadvisable to use this method on a wiki exposed to the public internet. See the discussion below.

Solved using the following:

SetEnvIfNoCase User-Agent VisualEditor-MediaWiki/* visualeditor
<Directory /var/www/>
    AuthUserFile /var/www/files/.htpasswd
    AuthName "Restricted Access"
    AuthType Basic
    Require local
    Require env visualeditor
    Require valid-user
</Directory>
Eddie K Smith (talkcontribs)

Also tried the following:

<Directory /var/www/>
   <If "%{REMOTE_ADDR} != '127.0.0.1'">
       AuthType Basic
       AuthName "Development Environment"
       AuthUserFile /var/www/files/.htpasswd
       require valid-user
   </If>
</Directory>

Which looks very similar to User:Andrujhon's solution. Just that it is done in apache conf instead of LocalSettings.php.

Reply to "Visual Editor on a password protected site"