From 732c35d51b840d954e41946cde828ca70d802df1 Mon Sep 17 00:00:00 2001 From: Jonathan Ruddell Date: Wed, 8 Apr 2020 12:10:35 -0400 Subject: [PATCH] fix encrypt response parsing Fix #434 --- src/main/webapp/app/registry/encryption/encryption.service.ts | 4 ++-- webpack/webpack.dev.js | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/app/registry/encryption/encryption.service.ts b/src/main/webapp/app/registry/encryption/encryption.service.ts index 7a3ff46d5..ef9a336c8 100644 --- a/src/main/webapp/app/registry/encryption/encryption.service.ts +++ b/src/main/webapp/app/registry/encryption/encryption.service.ts @@ -8,10 +8,10 @@ export class EncryptionService { constructor(private http: HttpClient) {} encrypt(textToEncrypt: string): Observable { - return this.http.post('config/encrypt', textToEncrypt).pipe(map((response: string) => '{cipher}' + response)); + return this.http.post('config/encrypt', textToEncrypt, { responseType: 'text' }).pipe(map((response: string) => '{cipher}' + response)); } decrypt(textToDecrypt: string): Observable { - return this.http.post('config/decrypt', textToDecrypt); + return this.http.post('config/decrypt', textToDecrypt, { responseType: 'text' }); } } diff --git a/webpack/webpack.dev.js b/webpack/webpack.dev.js index 3876219a5..a123508a0 100644 --- a/webpack/webpack.dev.js +++ b/webpack/webpack.dev.js @@ -21,6 +21,7 @@ module.exports = (options) => webpackMerge(commonConfig({ env: ENV }), { context: [ '/api', '/services', + '/config', '/management', '/swagger-resources', '/v2/api-docs',