Leuchtfeuer / locate

The users country and preferred language and other facts will be detected. Depending on configurable rules the user can be redirected to other languages or pages. New functionality can be added easily.
https://www.Leuchtfeuer.com
GNU General Public License v2.0
9 stars 14 forks source link

httpResponseCode is not used in v10 #30

Closed tgriessbach closed 2 years ago

tgriessbach commented 2 years ago

In typoscript it is possible to set a "httpResponseCode"

This is saved to $config['settings']['responseCode'] here: https://github.com/Leuchtfeuer/locate/blob/dev-10.0/Classes/Middleware/LanguageRedirectMiddleware.php#L54

But the locate/Classes/Action/Redirect.php->process() checks for the original name and casts it to (int) although it should be a string like "HTTP/1.1 301 Moved Permanently"

$this->httpStatus = $this->configuration['httpResponseCode'] ? (int)$this->configuration['httpResponseCode'] : HttpUtility::HTTP_STATUS_301;

elbebass commented 2 years ago

Release with https://github.com/Leuchtfeuer/locate/releases/tag/v10.0.3