simonw / simonw/datasette

"datasette -p 0 --root" gives the wrong URL

Open
#873 14 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

authentication-and-permissions bug minor
Dominant language
Python
Stars
11.5k
Forks
904
Avg merge
4d 17h
Merged PRs (30d)
18

Description

$ datasette -p 0 --root
http://127.0.0.1:0/-/auth-token?token=2d498c...

The port is incorrect.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with datasette -p 0 --root and inspect the entry point that starts the server and constructs the root authentication URL. Trace how the dynamically assigned port is obtained, then add or update a regression test showing that the displayed URL uses the bound port rather than 0.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.