D
D
Daria2020-07-14 12:57:36
Nginx
Daria, 2020-07-14 12:57:36

How to display a GO site in Firefox?

Faced a problem with displaying the desktop application on Firefox. At the same time, in the latest Chrome browser, everything displays perfectly.

The project uses : nginx, but I think that the problem is with firefox.

Each service on the back spins on its own port (the front pulls data from the back; the back uses a microservice architecture, each service has its own port and the front accesses each of them as necessary).
The front calls each service separately. All communication over https. Whence follows, that certificates are necessary.

All backing services have the same self-signed certificate, so sometimes a window pops up about the unreliability of the site. The certificate can be added to trusted.
If the browser does not trust the certificate, it cannot open a communication channel with the site.
Through experimentation, I found out that firefox stores trusted certificates in the format: Ip:port- certificate.

Those. back services cannot push data to the front, because firefox doesn't trust them.
To establish trust, you need to go to the developer tools in the browser and follow requests to the backing services - open a separate window with a proposal to trust the backing service and its certificate.

Suggested solution : the main idea is to hide from firefox the fact of accessing the backing services.
Suggested solution path :

  1. setting up nginx proxying;
  2. writing a broker (a service that collects data for the front - its creation is conditioned by the removal of the main load from nginx).


I tried various ways to solve similar problems on the front and on the back - so far nothing.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Roman Mirilaczvili, 2020-07-14
@darina46722

All backing services have the same self-signed certificate, so sometimes a window pops up about the unreliability of the site. The certificate can be added to trusted.

Why suffer like this? Install a certificate from Let's Encrypt.
For the front, nothing should be visible other than an Nginx proxy with a certificate (Let's Encrypt or others). And behind Nginx, build the backend however you like, because in simple cases, all backend services are within the same local network.
If inside your local network it should also be transmitted over a secure channel, then take certmagic

K
ky0, 2020-07-14
@ky0

If all communication takes place via HTTP, it is not clear why this crookedness with a bunch of self-signed certificates and custom ports. Distribute nginx services across different domains/urls and issue valid certificates via Let`s Encrypt.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question