Open ayophanz opened 2 years ago
You may create an application middleware that turns it back on or off for only the routes you would like.
For example, in Laravel we may do the following...
namespace App\Http\Middleware;
use Illuminate\Support\Facades\Config;
class EnableSsr
{
protected $except = [
'admin/*',
'portal/*',
];
public function handle($request, $next)
{
Config::set('inertia.ssr.enabled', ! $request->is($this->except));
return $next($request);
}
}
Thanks
I have admin and public pages now I want to exclude all pages under admin folder and only SSR the pages under public folder.