Can't deal with phx endpoint url

In production config I have:

config :app_phx, AppPhxWeb.Endpoint,
  url: [scheme: "https", host: "", port: 443]

However after running the prod mix server PORT=5000 MIX_ENV=prod mix phx.server I see that my Endpoint wants:

22:35:09.203 [info] Access AppPhxWeb.Endpoint at

There is no www infront of Why?
When I type my website in the url bar in chrome Endpoint gets as it should be and the site works, however in firefox browser:

22:36:26.042 [error] Could not check origin for Phoenix.Socket transport.

Origin of the request:

This happens when you are attempting a socket connection to 

(that www.)
If necessary → I’m using proxy via nginx, config:

server {

      server_name;  # removed (should I?)

      location / {

                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";
                proxy_http_version 1.1;


# other functions managed by Certbot


I tried via nginx to redirect ,www requests, without luck:

server {
  return 301 $scheme://$request_uri;

I know this is a bad approach, just for testing.
What are your thoughts, possible solutions?

Best Regars, ykostov