bug: ENDPOINT cannot be configurable
See original GitHub issueDescribe the bug
ENDPOINT cannot be configurable
Expected behavior
ENDPOINT can be set via environment variable
How to reproduce?
here is my docker-compose file as follow
# This compose file is for demonstration only, do not use in prod.
version: "3.9"
services:
app:
depends_on:
postgres:
condition: service_healthy
image: ghcr.io/logto-io/logto:${TAG-latest}
ports:
- 3001:3001
environment:
- ALL_YES=1
- NO_INQUIRY=0
- TRUST_PROXY_HEADER=1
- DB_URL_DEFAULT=postgres://postgres:p0stgr3s@postgres:5432
- ENDPOINT=https://logto.example.com
postgres:
image: postgres:14-alpine
user: postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: p0stgr3s
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5
when I open Admin Console via https://logto.example.com
, click create account button, it just redirect to
https://127.0.0.1:3001/oidc/auth?client_id=admin-console&redirect_uri=https%3A%2F%2Flogto.example.com%2Fconsole%2Fcallback&code_challenge=sa1zL03R9gYGibaj7Bf2Euwq_3s8T92-MPNyUyyNCvY&code_challenge_method=S256&state=_udq2h4pOI31mkJMpacDXjgZ-YFLiZR-PivdHRCD6ckZ3Cq4XxKnXhiYLvbhMT1lJgqki7WPo5UrloWh_MIDCg&response_type=code&prompt=consent&scope=openid+offline_access+profile&resource=https%3A%2F%2Fapi.logto.io
LOGTO_URL is hard code to https://127.0.0.1:3001
, this is not configurable from environment variable
Context
OS:
Environment:
Logto version:
Node version:
Postgres version:
Command of starting Logto:
Screenshots
Issue Analytics
- State:
- Created a year ago
- Comments:10 (6 by maintainers)
Top GitHub Comments
The miss of
proxy_set_header Host $host
lead to ENDPOINT set tohttps://127.0.0.1:3001
as default , make it looks likeENDPOINT
is hard-coded 😭my
docker-compose.yml
:and my nginx’s proxy config: