save_history_webhook does not work, if default language entry point is not "/"
We have a multi language site. The entry point of the default language is "/de/". If the website is opened without any language path, the \TYPO3\CMS\Frontend\Middleware\SiteBaseRedirectResolver
redirects the url to the default language entry point. E.g. http://test.com/
is redirected to http://test.com/de/
. This is also true for any additional parameters. So http://test.com/?saveOptinHistory
is also recirected to http://test.com/de/
without any parameters.
One solution would be to change the contents of Configuration/RequestMiddlewares.php
to
return [
'frontend' => [
'SGalinski/SgCookieOptin/saveOptinHistory' => [
'target' => \SGalinski\SgCookieOptin\Middlewares\SaveOptinHistory::class,
'after' => [
'typo3/cms-frontend/site-resolver',
],
'before' => [
'typo3/cms-frontend/base-redirect-resolver'
]
],
],
];
So the Middleware is executed before the SiteBaseRedirectResolver.