P
P
postya2021-01-14 22:11:34
Node.js
postya, 2021-01-14 22:11:34

How to get access to your API after getting an SSL certificate?

I have a VUE JS application
I have a server written in Nest JS

The client sends requests to the server's API using axios.
Previously, everything was normal, since both the client and the server worked via http.

Now I got a free certificate for my client application on Vue, and now the client cannot send API requests, an error is thrown:

net::ERR_SSL_PROTOCOL_ERROR


This is apparently due to the fact that the client has SSL and the server is running http

nginx file on a linux machine is configured only for the client. Because the server runs on Node js, and it does not require nginx

How can I make a site with SSL receive requests from the server on http?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SagePtr, 2021-01-14
@postya

No, browsers do not allow many types of resources to be loaded via http if the page itself uses https ( more details here ). Therefore, the only viable solution is to raise HTTPS on the server that works on the node (you can also proxy it through nginx, it's the easiest way).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question