This commit is contained in:
Julien Nahum 2024-03-12 12:30:57 +01:00
commit 5b01b538de
4 changed files with 13 additions and 6 deletions

View File

@ -1,7 +1,7 @@
<template>
<div class="flex mb-1 input-help">
<small :class="theme.default.help" class="grow flex">
<slot name="help"><span class="field-help" v-html="help" /></slot>
<slot name="help"><span v-if="help" class="field-help" v-html="help" /></slot>
</small>
<slot name="after-help">
<small class="flex-grow" />

View File

@ -54,7 +54,7 @@ export default {
computed: {
zapierUrl () {
opnformConfig.links.zapier_integration
return opnformConfig.links.zapier_integration
}
},
}

View File

@ -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;

View File

@ -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'])