Use absolute URLs everywhere, this should fix #3

This commit is contained in:
Bernd Bestel
2018-04-18 19:03:39 +02:00
parent 3d1c6fc5f0
commit 607a90cccc
36 changed files with 207 additions and 159 deletions

View File

@@ -4,11 +4,11 @@ use \Psr\Http\Message\ServerRequestInterface as Request;
use \Psr\Http\Message\ResponseInterface as Response;
use \Grocy\Middleware\SessionAuthMiddleware;
use \Grocy\Helpers\UrlManager;
use \Grocy\Services\ApplicationService;
require_once __DIR__ . '/vendor/autoload.php';
require_once __DIR__ . '/data/config.php';
require_once __DIR__ . '/extensions.php';
// Setup base application
if (PHP_SAPI !== 'cli')
@@ -21,6 +21,10 @@ if (PHP_SAPI !== 'cli')
'view' => function($container)
{
return new \Slim\Views\Blade(__DIR__ . '/views', __DIR__ . '/data/viewcache');
},
'UrlManager' => function($container)
{
return new UrlManager(BASE_URL);
}
]);