My Setup:
I have a Spring Boot (JAVA) service running on port 8080 on my local machine (laptop) which is using a self-signed ceritificate.
I have setup boringproxy server on AWS EC2 instance (of free-tier)
I have boringproxy client running on my laptop without issues.
PROBLEM:
If I hit my JAVA service (a demo endpoint e.g http://test.mydomain.com/demo) with http request (by removing self-signed certificate) via boringproxy it works fine and I get success response (200 OK)
But if I add self-signed certificate to my JAVA service and run the demo endpoint as https://test.mydomain.com/demo via boringproxy it fails with following error:
400 Bad Request
This combination of host and port requires TLS.
OBSERVATION:
I know something is wrong because boringproxy server already uses https and I am separately adding self-signed certificate to my JAVA service.
But my requirement is such that I have to add self-signed certificate to my JAVA service and still make it work via boringproxy
Please suggest what wrong am I doing.
Thanks.