Open craigrileyuk opened 10 months ago
@craigrileyuk
Maybe this a discussion can help you.
can-inertias-ssr-feature-be-enabled-only-for-some-pages
You can define two different layouts for admin panel and other pages.
views/layouts/app.blade.php
<-- this layout is basic and contains for example
@yield('head')
and you can add two additional layouts:
admin.blade.php
// admin.blade.php
@extends('layout.app')
@php($__inertiaSsr = null)
and ssr.blade.php
for inertia ssr pages.
Probably a niche case, but in a Laravel project we have two completely separate builds. We have the frontend which uses SSR; then we have the backend admin panel which uses Inertia as well, but does not use SSR.
The problem is that the SSR server will try to respond to every single request (i.e. both the frontend and the backend).
As a quick fix, in
inertia-laravel/src/Ssr/HttpGateway.php
, in thedispatch
function, I've done a check like so:Would it be possible to add some way to ignore certain routes using the config?