mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-20 03:51:00 +00:00
update system config url and http options
This commit is contained in:
parent
838b2a6a34
commit
fb4c7d288c
@ -20,16 +20,16 @@ export class SystemConfigService {
|
|||||||
private devices: Device[];
|
private devices: Device[];
|
||||||
private foldersSubject: Subject<Folder[]> = new Subject();
|
private foldersSubject: Subject<Folder[]> = new Subject();
|
||||||
private devicesSubject: Subject<Device[]> = new Subject();
|
private devicesSubject: Subject<Device[]> = new Subject();
|
||||||
private systemConfigUrl = environment.production ? apiURL + '/rest/system/config' : 'api/config';
|
private systemConfigUrl = environment.production ? apiURL + 'rest/system/config' : 'api/config';
|
||||||
|
|
||||||
private httpOptions;
|
private httpOptions;
|
||||||
|
|
||||||
constructor(private http: HttpClient, private cookieService: CookieService) { }
|
constructor(private http: HttpClient, private cookieService: CookieService) {
|
||||||
|
|
||||||
ngOnInit(): void {
|
|
||||||
this.httpOptions = { headers: new HttpHeaders(this.cookieService.getCSRFHeader()) };
|
this.httpOptions = { headers: new HttpHeaders(this.cookieService.getCSRFHeader()) };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ngOnInit(): void { }
|
||||||
|
|
||||||
getSystemConfig(): Observable<any> {
|
getSystemConfig(): Observable<any> {
|
||||||
return this.http
|
return this.http
|
||||||
.get(this.systemConfigUrl, this.httpOptions)
|
.get(this.systemConfigUrl, this.httpOptions)
|
||||||
|
Loading…
Reference in New Issue
Block a user