From 438c09bb35ed9b4efed2bd243020e482f074429d Mon Sep 17 00:00:00 2001 From: Art Date: Mon, 27 Sep 2021 15:52:01 +0300 Subject: [PATCH] 36.2a Testing Backend HTTPS access with frontend (#36, #32) --- README.md | 5 ++++- support-portal-frontend/src/environments/environment.ts | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0d2ecbd..a048093 100644 --- a/README.md +++ b/README.md @@ -455,4 +455,7 @@ systemctl restart docker 10. But now visiting direct LoadBalancer gave an error - `https://supportportalbackend-secured.eba-wfr5wya3.eu-north-1.elasticbeanstalk.com` - `NET::ERR_CERT_COMMON_NAME_INVALID` - +11. Test with Frontend + - Using **HTTP** `http://portal-back-secure.shyshkin.net` -> ERROR + - `Access to XMLHttpRequest at 'http://portal-back-secure.shyshkin.net/user?size=2147483647' from origin 'http://localhost:4200' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request.` + - Using **HTTPS** `https://portal-back-secure.shyshkin.net` -> OK diff --git a/support-portal-frontend/src/environments/environment.ts b/support-portal-frontend/src/environments/environment.ts index 86b6c1b..01443e3 100644 --- a/support-portal-frontend/src/environments/environment.ts +++ b/support-portal-frontend/src/environments/environment.ts @@ -4,7 +4,8 @@ export const environment = { production: false, - apiUrl: 'http://portal-bean.shyshkin.net', + apiUrl: 'https://portal-back-secure.shyshkin.net', + // apiUrl: 'http://portal-bean.shyshkin.net', // apiUrl: 'http://supportportalbackend-env.eba-wfr5wya3.eu-north-1.elasticbeanstalk.com', // apiUrl: 'http://support-portal.shyshkin.net:5000', // apiUrl: 'http://localhost:8080',