]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/main.ts
Server: avoid request entity too large for requests between pods
[github/Chocobozzz/PeerTube.git] / client / src / main.ts
index f9c1d50b8f963efafbae056c8d861627d459919a..7c058e12fd165a77e993f602a1c23feb8f3857c0 100644 (file)
@@ -1,12 +1,34 @@
-import { enableProdMode } from '@angular/core';
+import { enableProdMode, provide } from '@angular/core';
+import { disableDeprecatedForms, provideForms } from '@angular/forms';
+import {
+  HTTP_PROVIDERS,
+  RequestOptions,
+  XHRBackend
+} from '@angular/http';
 import { bootstrap }    from '@angular/platform-browser-dynamic';
 import { provideRouter } from '@angular/router';
 
-import { AppComponent } from './app/app.component';
 import { routes } from './app/app.routes';
+import { AuthHttp, AuthService } from './app/shared';
+import { AppComponent } from './app/app.component';
 
 if (process.env.ENV === 'production') {
   enableProdMode();
 }
 
-bootstrap(AppComponent, [ provideRouter(routes) ]);
+bootstrap(AppComponent, [
+  HTTP_PROVIDERS,
+  provide(AuthHttp, {
+    useFactory: (backend: XHRBackend, defaultOptions: RequestOptions, authService: AuthService) => {
+      return new AuthHttp(backend, defaultOptions, authService);
+    },
+    deps: [ XHRBackend, RequestOptions, AuthService ]
+  }),
+
+  AuthService,
+
+  provideRouter(routes),
+
+  disableDeprecatedForms(),
+  provideForms()
+]);