]> _ Git - bastide-resah.git/commitdiff
wip #6871 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 18 Apr 2024 14:22:38 +0000 (16:22 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 18 Apr 2024 14:22:38 +0000 (16:22 +0200)
app/Http/Controllers/CatalogController.php [new file with mode: 0644]
public/.htaccess
routes/web.php

diff --git a/app/Http/Controllers/CatalogController.php b/app/Http/Controllers/CatalogController.php
new file mode 100644 (file)
index 0000000..8f25bde
--- /dev/null
@@ -0,0 +1,21 @@
+<?php
+
+namespace App\Http\Controllers;
+
+use App\Fluidbook\Compiler\Compiler;
+use App\Models\FluidbookHealthIssues;
+use Cubist\Backpack\Http\Controllers\Base\XSendFileController;
+use Cubist\Util\PHP;
+
+class CatalogController extends Controller
+{
+    public function index($path = 'index.html')
+    {
+        PHP::neverStop(false);
+
+        $cpath = auth()->guest() ? 'fluidbooks/catalogue_invite' : 'fluidbooks/catalogue';
+
+        $relayPath = base_path($cpath) . '/' . $path;
+        return XSendFileController::sendfile($relayPath);
+    }
+}
index 3aec5e27e5db801fa9e321c0a97acbb49e10908f..c65d98cc66367dd4253972900a21464ec0fc1327 100644 (file)
@@ -9,10 +9,10 @@
     RewriteCond %{HTTP:Authorization} .
     RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
 
-    # Redirect Trailing Slashes If Not A Folder...
-    RewriteCond %{REQUEST_FILENAME} !-d
-    RewriteCond %{REQUEST_URI} (.+)/$
-    RewriteRule ^ %1 [L,R=301]
+#    # Redirect Trailing Slashes If Not A Folder...
+#    RewriteCond %{REQUEST_FILENAME} !-d
+#    RewriteCond %{REQUEST_URI} (.+)/$
+#    RewriteRule ^ %1 [L,R=301]
 
     # Send Requests To Front Controller...
     RewriteCond %{REQUEST_FILENAME} !-d
index d259f33ea86c43a079839b711b6129d5798f38f4..a420db092f3b6d0d67335650ee233663a1c45588 100644 (file)
@@ -2,17 +2,4 @@
 
 use Illuminate\Support\Facades\Route;
 
-/*
-|--------------------------------------------------------------------------
-| Web Routes
-|--------------------------------------------------------------------------
-|
-| Here is where you can register web routes for your application. These
-| routes are loaded by the RouteServiceProvider and all of them will
-| be assigned to the "web" middleware group. Make something great!
-|
-*/
-
-Route::get('/', function () {
-    return view('welcome');
-});
+Route::get('/catalogue/{path?}', \App\Http\Controllers\CatalogController::class . '@index')->where('path', '.*');