So the ROOT_URL
parameter could be constructed from the DOMAIN
and the HTTP_PORT
That is not always true. The HTTP_PORT
is the port gogs listens for incoming traffic, but this does not necessarily mean that you can reach gogs under that port.
For example, I let gogs listen on port 3000 on localhost, however gogs is available under git.example.com
because my apache server, listening on port 80, acts as a proxy and redirects traffic for this subdomain to gogs. If you couldn't configure the ROOT_URL
yourself and gogs would just take the DOMAIN
and PORT
to create the full URL, this wouldn't be possible because gogs would gegerate wrong links and wrong clone-urls.