Preview Hidden Pages
How to configure your application to preview hidden pages?
The headless extension supports the preview functionality for hidden pages. However, proper configuration is required to ensure your application works as expected.
Since there is no concept of cross-domain cookies, ensure that both your backend and frontend servers share the same root domain (e.g., backend: api.domain.com, frontend: domain.com). Then, set the root domain as cookie
(note the dot at the beginning).
$GLOBALS['TYPO3_CONF_VARS']['BE']['cookieDomain'] = '.domain.com';
Important
If you are logged into the backend during this change (after deployment), you may need to remove the be_
cookie from your browser. The old cookie will conflict with the new configuration, preventing you from logging in.
If your frontend application correctly passes all cookies from the backend, you should be able to preview content associated with the root domain.
Note
If you have a multi-domain setup, e.g., api.
, domain1.
and api.
, domain2.
, this solution will not work out-of-the-box. You will need to override TYPO3_
dynamically. This hasn't been extensively tested, but theoretically, you could achieve this by running custom middleware as the first one in the stack.
(Optional) Make the backend application available via a proxy, e.g., domain.
. This step is not strictly necessary for the application to run but can help resolve various issues in the long run.