cli icon indicating copy to clipboard operation
cli copied to clipboard

When developing locally Studio configuration assumes API is running on port configured in API section

Open Paul-HeathCo opened this issue 1 year ago • 1 comments

When running in dev container (code spaces) endpoints get forwarded. So API endopoint of http://127.0.0.1:54321 becomes https://codespace123-54321.app.github.dev (running on port 443). There is no way to configure this in .toml file because studio setup code here assumes API endpoint is running at port 54321 (as configured in API section).

Proposed fix is to allow to specify port explicitly like sample below:

[studio]
enabled = true
# Port to use for Supabase Studio.
port = 54323
# External URL of the API server that frontend connects to.
api_url = "https://codespace123-54321.app.github.dev:443" 

Paul-HeathCo avatar Jul 04 '24 00:07 Paul-HeathCo

Could you show me a screenshot of studio or network tabs that is broken due to this misconfig? It's for me to verify a potential fix https://github.com/supabase/cli/pull/2487/commits/a545a5a3727ab1061f4de8e40b85bea51865f582

sweatybridge avatar Jul 04 '24 10:07 sweatybridge