ERR_INVALID_RESPONSE trying to get push_service_worker.js

AI-generated summary

The original poster, dani14_96, is experiencing an ERR_INVALID_RESPONSE error when trying to access push_service_worker.js in their Discourse instance. The instance is running in a Docker container behind an Apache reverse proxy with SSL certification from Let’s Encrypt. Falco questions the need to expose port 4443 for HTTPS, and dani14_96 explains their initial thought process. Falco suggests checking the plugin settings and force_ssl status. After reinstalling and activating the plugin, dani14_96 resolves the issue, realizing the error was due to the plugin being uninstalled.

I’m running Discourse in a docker container behind a reverse proxy with Apache, so my app.yml config file is
expose:
- “8080:80” # http
- “4443:443” # https
The reverse proxy works for http connections. I installed a ssl certificate with letsencrypt as explained here, and it works too.
Chrome Developer Tools show that if fails to GET push-service-worker.js

Browsing https://foro.soybiotec.es/push-service-worker.js in Chrome gives Discourse custom error 404 page. What could be the problem here?

Why are you exposing 4443 if https is done on Apache?

@Falco At first I thought the way to have a https would be to have another reverse proxy, same as for http.

Did you enable the plugin on settings? Also is force_ssl enabled?

I had just uninstalled the plugin for testing. Installed and activated and error disappears. Sorry for being so dummy. I thought I had found the reason why Push Notifications don’t work for me.