Nuxt & axios configuration with a tenant subdomain designed API

523 Views Asked by At

Does anyone knows how I am supposed to manage Nuxt & axios configuration with a multi-tenant API built with django-rest-framework and django-tenants (https://github.com/django-tenants/django-tenants)?

This API is reachable by tenant subdomain: tenant1.example.com/api, tenant2.example.com/api, ... (within my dev environment: tenant1.localhost:8000/api, tenant2.localhost:8000/api, ...)

In my Nuxt app, I want to use @nuxtjs/axios and @nuxtjs/auth-next.

→ How can I proxy axios API URL to take into account the API subdomains (tenant1.example.com/api, ...)?

→ How can I configure auth endpoints (tenant1.example.com/api/login, ...)?

Thanks for your help!

0

There are 0 best solutions below