docker
This commit is contained in:
@@ -19,6 +19,14 @@ import { VerifyEmailComponent } from './app/pages/verify-email.component';
|
||||
import { API_BASE_URL } from './app/shared/api-base-url';
|
||||
import { AuthService } from './app/shared/auth.service';
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
__LDAP_PORTAL_CONFIG__?: {
|
||||
apiBaseUrl?: string;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
const authInterceptor: HttpInterceptorFn = (request, next) => {
|
||||
const token = localStorage.getItem('accessToken');
|
||||
if (!token) {
|
||||
@@ -58,6 +66,6 @@ bootstrapApplication(AppComponent, {
|
||||
provideRouter(routes),
|
||||
provideHttpClient(withInterceptors([authInterceptor])),
|
||||
AuthService,
|
||||
{ provide: API_BASE_URL, useValue: 'http://localhost:3000' },
|
||||
{ provide: API_BASE_URL, useValue: window.__LDAP_PORTAL_CONFIG__?.apiBaseUrl ?? 'http://localhost:3000' },
|
||||
],
|
||||
}).catch((error) => console.error(error));
|
||||
|
||||
Reference in New Issue
Block a user