We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d18a5e6 commit c4c3ef7Copy full SHA for c4c3ef7
app/public/index.php
@@ -34,10 +34,13 @@
34
35
// Set view in Container
36
$container->set('view', function () {
37
- if (!empty($_SERVER['PATH_INFO'])) {
38
- $matomoVersionFromUrl = MatomoVersionMiddleware::getMatmoVersionFromUrl($_SERVER['PATH_INFO']);
39
- if (!empty($matomoVersionFromUrl)) {
40
- Environment::setPiwikVersion($matomoVersionFromUrl);
+ foreach (['ORIG_PATH_INFO', 'PATH_INFO'] as $pathServer) {
+ if (!empty($_SERVER[$pathServer])) {
+ $matomoVersionFromUrl = MatomoVersionMiddleware::getMatmoVersionFromUrl($_SERVER[$pathServer]);
+ if (!empty($matomoVersionFromUrl)) {
41
+ Environment::setPiwikVersion($matomoVersionFromUrl);
42
+ break;
43
+ }
44
}
45
46
0 commit comments