question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DomainTenantResolveContributor does not resolve domain

See original GitHub issue
  • Your Abp package version. 8.0
  • Your base framework: .Net Core.
  1. Activated MultiTenancy and specified DomainFormat.
  2. Application deployed via DigitalOcean as ‘App’, separated for Frontend and Backend
  3. Everything released, everything works except for domain resolver, my tenantId is always null whatever domain I pass.

mytenant.mydomain.com - frontend api.mydomain.com - backend

however inside DomainTenantResolveContributor from Abp.AspNetCore.MultiTenancy (as below picture related), Host is being taken and then resolved (as host), instead of mytenant.mydomain.com I receive api.mydomain.com. Am I missing some header from frontendside/backendside in configuration (like X-Forwarded-Host)?

That makes me think that most probably I need to create my own TenantResolveContributor that is getting origin instead of Host.Host. Do you think we have a bug inside this TenantResolver or it is my misconfiguration?

Localhost screenshot, to prove that Host in my situation is backend host, instead of frontend host. image

Issue Analytics

  • State:closed
  • Created 8 months ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
ruzanowskicommented, Jan 16, 2023

Hello, this is how I managed to resolve this issue:

( after two days of debugging 😃 ) image

0reactions
ruzanowskicommented, Jan 19, 2023

Cheers

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using subdomain is not resolving to a tenant - abp
So I'm attempting to use subdomains using the tenant's name to resolve such. In my case, working in local host, I edited my...
Read more >
Question regarding DomainTenantResolveContributor #4708
Does the Domain resolver work in localhost? if not how can I achieve it? Here is what I have tried as of now....
Read more >
[SOLVED] External Subdomain Does Not Resolve Internally
Solution: Yes, you forward to specific external DNS. You can setup conditional forwarding. I don't remember, to be honest.
Read more >
Tenant Name matching rules in Domain Tenant Resolver #2638
For example, I have a tenant with the name "No Rules" in the database, and I want to match on "norules.localhost", but the...
Read more >
SET SUBDOMAIN FOR HOST TENANT #5560
I want to go to the Host login page only when I enter admin.domain.com. Other unregistered tenants are located. 404 page. What should...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found