Closed WillyReyno closed 3 years ago
I'm closing this issue!
The solution was to declare nova routes as Universal Routes :
Added universal
to nova.php
middleware list, before the InitializeTenancyByDomainOrSubdomain
:
'middleware' => [
'universal',
InitializeTenancyByDomainOrSubdomain::class,
'web',
Authenticate::class,
DispatchServingNovaEvent::class,
BootTools::class,
Authorize::class,
],
Thanks to @morloderex !
Hey, I'm trying to do the same thing, the docs are very poor when it comes to install nova. I was wondering if you have any kind of guide? Right now I'm getting the ERR_TOO_MANY_REDIRECTS error on my browser when I try to access https://localhost.test/nova/login
Thanks in advance.
i'm having the same problem @stancl
Hey, I'm trying to do the same thing, the docs are very poor when it comes to install nova. I was wondering if you have any kind of guide? Right now I'm getting the ERR_TOO_MANY_REDIRECTS error on my browser when I try to access https://localhost.test/nova/login
Thanks in advance.
Getting the same Error, i think this issue should be reopened
Getting the same Error when trying to access In the tenant app
Same error, getting ERR_TOO_MANY_REDIRECTS
Unfortunately, I also get the error message ERR_TOO_MANY_REDIRECTS when I follow these instructions https://tenancyforlaravel.com/docs/v3/integrations/nova/
Any solutions yet? I am facing too many redirects issues when adding universal to nova.middleware and removing it results in an error "Tenant could not be identified on domain localhost" when accessing Nova from the central domain
Hi all, I found a fix, as this doesn't seem to be working. I created a new Middleware with the following code:
/**
* Handle an incoming request.
*
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
*/
public function handle(Request $request, Closure $next): Response
{
if ($this->isSubdomain($request->getHost())) {
return app(InitializeTenancyBySubdomain::class)->handle($request, $next);
}
return $next($request);
}
protected function isSubdomain(string $hostname): bool
{
return !in_array($hostname, config('tenancy.central_domains'));
}
Then placed that inside the middleware array in nova.php, seems to work
Describe the bug
Hello, I'm not 100% sure if this is considered a bug, if not, feel free to redirect me to where I should report this!
I am trying to set Laravel Nova in both my central & tenants domain, I want the following:
website.localhost/nova
→ handling tenants & its own userstest.website.localhost/nova
→ handling its own users and other resourcesI tried following the documentation and successfully installed Nova, however I'm getting a weird behavior on the central domain.
Following the documentation, I added this to my config
nova.middleware
:When I hit my subdomain
test.website.localhost/nova
everything works fine, and I can access nova and see the tenant's users.When I hit my central app
website.localhost/nova
I get aNotASubdomainException
with error:Steps to reproduce
website.localhost
Expected behavior
I expect to reach nova from my central app and be able to see its own users & tenants.
Your setup