Behind an HTTPS proxy
When a proxy handles HTTPS (company proxy such as nginx, Traefik or IIS, or a hosting provider with its own certificate), the Save2ERP server listens over HTTP, on the port called by the proxy:
SERVER_PROTOCOL=http
SERVER_PORT=5000 # the port called by the proxy
SERVER_TRUST_PROXY=1 # number of proxies in front of the serverSERVER_TRUST_PROXY tells how many proxies are in front of the server. The server then uses their X-Forwarded-* headers to know the protocol and the users' real IP address. Set a number (or the proxies' IP addresses) rather than true, which would trust headers that a client can forge.
The HTTP port must never be exposed
In http mode, traffic to the server is not encrypted: only the proxy must be able to reach this port. With Docker, see Docker.
The OAuth2 redirect URI (OAUTH_CALLBACK_URI) remains the public HTTPS address, the proxy's: for example https://save2erp.my-company.com/auth/callback.