fix local files in docker (#338)
* fix local files in docker Response::make diesnt exist anymore and the nginx.conf didnt allow the needed paths * fix import in api.php --------- Co-authored-by: Christian Willing <cw@c2c-erp.de> Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
@@ -20,7 +20,6 @@ use App\Http\Controllers\TemplateController;
|
||||
use App\Http\Controllers\WorkspaceController;
|
||||
use App\Http\Middleware\Form\ResolveFormMiddleware;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
@@ -227,10 +226,8 @@ Route::get('local/temp/{path}', function (Request $request, string $path) {
|
||||
if (! $request->hasValidSignature()) {
|
||||
abort(401);
|
||||
}
|
||||
$response = Response::make(Storage::get($path), 200);
|
||||
$response->header('Content-Type', Storage::mimeType($path));
|
||||
|
||||
return $response;
|
||||
return response()->file(Storage::path($path), ['Content-Type' => Storage::mimeType($path)]);
|
||||
})->where('path', '(.*)')->name('local.temp');
|
||||
|
||||
Route::get('caddy/ask-certificate/{secret?}', [\App\Http\Controllers\CaddyController::class, 'ask'])
|
||||
|
||||
Reference in New Issue
Block a user