mirror of
https://github.com/grocy/grocy.git
synced 2025-08-22 21:10:47 +00:00
Use absolute URLs everywhere, this should fix #3
This commit is contained in:
17
helpers/UrlManager.php
Normal file
17
helpers/UrlManager.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace Grocy\Helpers;
|
||||
|
||||
class UrlManager
|
||||
{
|
||||
public function __construct(string $basePath) {
|
||||
$this->BasePath = $basePath;
|
||||
}
|
||||
|
||||
protected $BasePath;
|
||||
|
||||
public function ConstructUrl($relativePath)
|
||||
{
|
||||
return rtrim($this->BasePath, '/') . $relativePath;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user