Different base domain for localized website (CORS)
We have a single tree setup with two languages and fallbackType: strict
.
- The default language uses the base URL www.domain.de (sys_language_uid=0)
- The localized website uses the differing base URL www.domain.com (sys_language_uid=1)
Problem: The frontend assets of sg_cookie_optin are always rendered using the default base domain. This leads to CORS policy issues for the localized website.
Access to script at 'https://www.domain.de/fileadmin/sg_cookie_optin/siteroot-1/cookieOptin.js?1657792279' from origin 'https://www.domain.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Can this issue be solved with the current configuration options or must the extension be extended to support different domains for localizations?
- TYPO3 11.5.13
- PHP 8.0.17
- sg_cookie_optin 4.5.0