[stable28] fix(settings): define a 'heartbeat' route, so SecurityHeaders can handle redirected root
Backport of PR #45228
Is this route actually used in NC28?
The security headers check was migrated in NC29. Previously OC.generateUrl('heartbeat') was used.
Is this route actually used in NC28?
The security headers check was migrated in NC29. Previously
OC.generateUrl('heartbeat')was used.
It’s cleaner to have the route in the system since it exists. And if the migration of the check is ever backported we won’t get a bug from it.
Pushed https://github.com/nextcloud/server/pull/45955/commits/b5cf0992a2e166080ab8c186cf499360e565e141 to fix the failing test.
The router uses include_once to load route definitions from the apps.
First include_once for apps/files/appinfo/routes.php returns the expected array.
Second include_once returns true, because the file was already included.
To workaround the tests must run in a separate process.
I have no idea why the test is not failing on master.
To workaround the tests must run in a separate process.
That does not seem to work
I have no idea why the test is not failing on master.
The test is not failing on master because the app manager instance is mocked, the app path is null and the routing file not even included: https://github.com/nextcloud/server/pull/46416