Allows the Contao Crawler to be logged in as a front end member via Basic Authentication in Contao 4.13 in order to index protected pages.
- Install the extension (zero configuration necessary in the Contao Managed Edition).
- Create a front end member specifically for the Contao Crawler or re-use an existing one where you know the password.
- Assign the member to the appropriate member groups.
- Now choose one of the following options (replace
<username>
and<password>
with the member's credentials):- Pass the member's username and password for every
contao:crawl
execution:CRAWLER_AUTH=<username>:<password> vendor/bin/contao-console contao:crawl --subscribers=search-index --max-depth=3
- Define the member's username and password in the
.env.local
:These will then get used automatically every time you execute# .env.local CRAWLER_AUTH=<username>:<password>
contao:crawl
(unless overridden by the former command). Make sure you also have a.env
file, otherwise the.env.local
will not be loaded of course.
- Pass the member's username and password for every
Note: be aware that the member's password will be put unencrypted into the bash history in the former case and into
the .env.local
in the latter case.