Configure proxy for API requests and remove hardcoded apiUrl from environment files.
This commit is contained in:
@@ -3,15 +3,12 @@ import {AppComponent} from './app/app.component';
|
||||
import {provideRouter} from '@angular/router';
|
||||
import {routes} from './app/app.routes';
|
||||
import {provideHttpClient, withInterceptors} from '@angular/common/http';
|
||||
import {BASE_PATH} from '@api';
|
||||
import {environment} from '@environment';
|
||||
import {authInterceptor} from '@services/AuthInterceptor';
|
||||
|
||||
bootstrapApplication(AppComponent, {
|
||||
providers: [
|
||||
provideRouter(routes),
|
||||
provideHttpClient(),
|
||||
{provide: BASE_PATH, useValue: environment.apiUrl},
|
||||
provideHttpClient(
|
||||
withInterceptors([authInterceptor])
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user