[SSL] What's wrong with postman requesting https interface (SSL connections are being blocked)? How to configure SSL certificate to the latest version of postman?


foreword

When I was developing a small thing a few days ago, I encountered a problem: the SpringBoot interface was suddenly inaccessible , and I also wrote a blog, [The road to Java into the pit] The project in Spring Boot compiles normally, but the RestController interface suddenly fails. no access

As a result, I encountered this problem again today! Besides, there is basically no problem with my code. I can't request it when I use postman locally. Later, I can't solve it with my own method (including restarting the computer). I directly requested the GET interface with the browser and found that I could request it. The original Not my interface problem!

Later, by querying the information, it was found that it was a problem with the ssl certificate.


text

When using postman request, I found a detail, which was ignored last time!
insert image description here
I think the general meaning is that you need to use chrome to import the SSL certificate. The way to see the Internet is to open the postman settings certificate file
insert image description here
(picture from https://blog.csdn.net/fangkang7/article/details/84338498)
But the postman on my side is In this way, there are so many options (covering my face) that
insert image description here
I hurried to the official website to re-download a postman, the download link https://www.getpostman.com/downloads/

Temporary setup request

Before setting up postman, we can temporarily allow postman to access https
to open chrome, and then enter the local https address, such as https://localhost/hello , it will prompt us that this is an insecure link, click the red box location to use postman Request, but there is a drawback, when chrome is closed, postman will not be able to request, then we can use another method.
insert image description here

Import the certificate into postman

Open the real postman , in the settings SETTING, close the SSL certificate verification below,
insert image description here
open the Certificates in the SETTING, click Add Certificates andinsert image description here
fill in the file directory of the certificate in the following format. There are many ways to obtain the certificate. I also wrote one before. The tutorial for obtaining the Alibaba Cloud server certificate, click here to apply for the Alibaba Cloud server SSL certificate
and click Add to
insert image description here
test the interface.

https://localhost/hello

Successfully returned to hello to
insert image description here
test the https interface written by yourself, OK, no problem!
insert image description here


Summarize

Hahahaha, I always thought it was a problem with my own network or other aspects, but I didn't expect that it was because the SSL certificate was not imported
but it was ok before. As for the reason why the request suddenly appeared ineffective, I am not sure. If there is If you know about it, you can leave a comment below.
Oh right, I just finished running, I really like the feeling of climbing uphill, although it is very tired and difficult to run, but when you finish running uphill, you will have another experience, an achievement of conquering the uphill feel!
mutual encouragement!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326080227&siteId=291194637