diff --git a/proxy.conf.json b/proxy.conf.json index 6c9d77bee241bf175a367621922204942b09e1ff..70c21305f4f69a5eddeb234cf6d4b134a539301d 100644 --- a/proxy.conf.json +++ b/proxy.conf.json @@ -1,6 +1,12 @@ { - "/api": { - "target": "http://localhost:3000" + "/api/*": { + "target": "http://localhost:3000", + "secure": false, + "changeOrigin": true, + "logLevel": "debug", + "pathRewrite": { + "^/api": "" + } }, "/base-adresse/base-adresse-nationale/streets": { "target": "https://passerelle.formulaireextranet.grandlyon.com", diff --git a/src/app/services/structure-list.service.ts b/src/app/services/structure-list.service.ts index 853256af6f8178c3a16d7c5bfbf79f591eee0d42..faf14254cda6410e18fcb0c340881d90ef2826d8 100644 --- a/src/app/services/structure-list.service.ts +++ b/src/app/services/structure-list.service.ts @@ -18,7 +18,7 @@ export class StructureService { constructor(private http: HttpClient) {} public getStructures(filters: Filter[]): Observable<Structure[]> { - return this.http.get('/api/Structures').pipe(map((data: any[]) => data.map((item) => new Structure(item)))); + return this.http.get('/api/structures').pipe(map((data: any[]) => data.map((item) => new Structure(item)))); } /**