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:
parent
299e1e677a
commit
9883604941
|
|
@ -25,6 +25,16 @@ server {
|
|||
try_files $uri $uri/ /index.php$is_args$args;
|
||||
}
|
||||
|
||||
location /local/temp/ {
|
||||
set $original_uri $uri;
|
||||
try_files $uri $uri/ /index.php$is_args$args;
|
||||
}
|
||||
|
||||
location /forms/assets/ {
|
||||
set $original_uri $uri;
|
||||
try_files $uri $uri/ /index.php$is_args$args;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass unix:/var/run/php-fpm-opnform-site.sock;
|
||||
|
|
|
|||
|
|
@ -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'])
|
||||
|
|
|
|||
Loading…
Reference in New Issue