Issue
- Is it possible to enable cookies for a specific site?
Environment
- Liferay DXP 7.4
Resolution
- The ability to configure cookies on a per-site basis in Liferay requires defining a virtual host. If a site does not have a virtual host specified, the cookie settings for that site will not take effect, and the instance-wide cookie settings will be used instead.
- Therefore, to manage cookie settings for a new site, you should define a virtual host and adjust the cookie settings accordingly. If you disable cookie settings for this virtual host, the consent banner will not appear when accessing that site.
-
The decision to require a virtual host for site-specific cookie settings ensures consistency and clarity. This approach guarantees that the correct settings are applied based on the host used in the request.
Additional Information