I have a backend application that is running on weblogic server. It is running on http://localhost:7000. This application has to be called with http://localhost:7000 then after verification it checks if the application schema is on https or not. If its not then it asks you to redirect to https://localhost:7001. The HTTPS configuration is enabled on weblogic server
So far everything running on same domain meaning the application is full fledge with java backend and angular js embedded frontend. So everything running on weblogic server. Now we are in the process of migrating from angular js to angular. Now angular is running on http://localhost:4200. So I have created a proxy for HTTP call
{ "/api": { "target": " http://127.0.01:7000", "secure": false, "logLevel": "debug", "changeOrigin": true } }
And started server like so: ng serve --proxy-config proxy.conf.json -o
server started on 4200 and creates proxy on http://127.0.01:7000/api
I have also created ssl proxy for HTTPS call { "/api": { "target": "https://127.0.01:7001", "secure": false, "logLevel": "debug", "changeOrigin": true } }
Also started server like so on different port ng serve --proxy-config proxy.ssl.conf.json –-port 4400
server started on 4400 and creates proxy on https://127.0.01:7001/api
Now I make the first call to backend url http://127.0.01:7000/api/permission It calls through as http://localhost:4200/api/permission
It goes through filter and does some processing then it checks if call is through http or https if not then asks to redirect to https://localhost:7001/api/permission with some status code.
So in angular inside interceptor I check for the status, if status is for redirect, I redirect the url to https://127.0.01:7001/api/permission using window.location.href=”https://localhost:4400/api/permission” don’t be confuse because it calls like https://localhost:4400 and concat with backend url which is /api/permission. Angular folks must be aware of that. But I get a 504 error gateway timeout on chrome dev tools console On cmd where I have started the ng server I get this Error occurred while trying to proxy request /api/permission from localhost:4400 to https://127.0.01:7001 (ECONNRESET) (https ://nodejs.org/api/errors.html#errors_common_system_errors)
I am dead sure it’s a SSL issue but I just don’t know how to fix this. I have done a lot research on this. I am frustrated, I have spent more than enough time to find a solution for this. I cant basically move pass this till its converted from http to https because rest of the uri calls must be made on https.
I found a link How to send an HTTPS request from an Angular front-end to a server secured with a self signed certificate?
I think solution number one made sense
But I cant say for sure. Any help please. I would really appreciate that. I am pretty much stuck at this point.
Cheers
Sorry I am a bit late to answer. But the exact answer to my problem was PKI which is mutual authentication configured on weblogic and the way its done is you need to deploy your angular app on weblogic to kick in mutual authentication. There are several videos out their on how to deploy angular app on weblogic if someone looking to learn as well as how to configure mutual authentication on weblogic. Cheers