From da6d7865742ca92af964706fff18fe0ffe40841e Mon Sep 17 00:00:00 2001 From: Art Date: Tue, 28 Sep 2021 17:04:52 +0300 Subject: [PATCH] 27.4.2. Modified public URLs for getting profile image - frontend (#27) --- .../src/app/interceptor/auth.interceptor.spec.ts | 5 ++--- support-portal-frontend/src/environments/environment.prod.ts | 2 +- support-portal-frontend/src/environments/environment.test.ts | 2 +- support-portal-frontend/src/environments/environment.ts | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/support-portal-frontend/src/app/interceptor/auth.interceptor.spec.ts b/support-portal-frontend/src/app/interceptor/auth.interceptor.spec.ts index 89b1ef2..36750eb 100644 --- a/support-portal-frontend/src/app/interceptor/auth.interceptor.spec.ts +++ b/support-portal-frontend/src/app/interceptor/auth.interceptor.spec.ts @@ -28,9 +28,8 @@ describe('AuthInterceptor', () => { expect(interceptor.isRequestUrlMatches('http://example.com:8080/user')).toBeFalsy(); expect(interceptor.isRequestUrlMatches('http://localhost:8080/user/login')).toBeFalsy(); expect(interceptor.isRequestUrlMatches('http://localhost:8080/user/register')).toBeFalsy(); - expect(interceptor.isRequestUrlMatches('http://localhost:8080/user/image/profile/1234567/avatar.jpg')).toBeFalsy(); - expect(interceptor.isRequestUrlMatches('http://localhost:8080/user/image/profile/1234567')).toBeFalsy(); - expect(interceptor.isRequestUrlMatches('http://localhost:8080/user/art.shyshkin/image/profile')).toBeFalsy(); + expect(interceptor.isRequestUrlMatches('http://localhost:8080/user/d470296c-97fb-44ce-9253-69f3331d7b77/profile-image/avatar.jpg')).toBeFalsy(); + expect(interceptor.isRequestUrlMatches('http://localhost:8080/user/d470296c-97fb-44ce-9253-69f3331d7b77/profile-image')).toBeFalsy(); }); it('should intercept NON-public URLs', () => { diff --git a/support-portal-frontend/src/environments/environment.prod.ts b/support-portal-frontend/src/environments/environment.prod.ts index f7dc144..800fa4f 100644 --- a/support-portal-frontend/src/environments/environment.prod.ts +++ b/support-portal-frontend/src/environments/environment.prod.ts @@ -3,5 +3,5 @@ export const environment = { // apiUrl: 'http://support-portal.shyshkin.net:5000', // apiUrl: 'http://dockerapp.shyshkin.net:8080', apiUrl: 'https://dockerapp.shyshkin.net', - publicUrls: ['/user/login', '/user/register', '/user/*/image/**', '/user/image/**'] + publicUrls: ['/user/login', '/user/register', '/user/*/profile-image', '/user/*/profile-image/**'] }; diff --git a/support-portal-frontend/src/environments/environment.test.ts b/support-portal-frontend/src/environments/environment.test.ts index 523fbe8..070437e 100644 --- a/support-portal-frontend/src/environments/environment.test.ts +++ b/support-portal-frontend/src/environments/environment.test.ts @@ -1,5 +1,5 @@ export const environment = { production: false, apiUrl: 'http://localhost:8080', - publicUrls: ['/user/login', '/user/register', '/user/*/image/**', '/user/image/**'] + publicUrls: ['/user/login', '/user/register', '/user/*/profile-image', '/user/*/profile-image/**'] }; diff --git a/support-portal-frontend/src/environments/environment.ts b/support-portal-frontend/src/environments/environment.ts index 2b9c294..6f5d24c 100644 --- a/support-portal-frontend/src/environments/environment.ts +++ b/support-portal-frontend/src/environments/environment.ts @@ -10,7 +10,7 @@ export const environment = { // apiUrl: 'http://supportportalbackend-env.eba-wfr5wya3.eu-north-1.elasticbeanstalk.com', // apiUrl: 'http://support-portal.shyshkin.net:5000', apiUrl: 'http://localhost:8080', - publicUrls: ['/user/login', '/user/register', '/user/*/image/**', '/user/image/**'] + publicUrls: ['/user/login', '/user/register', '/user/*/profile-image', '/user/*/profile-image/**'] }; /*