Skip to content

fix: invitation and setup links never use a placeholder APP_URL - #2

Merged
elyess merged 1 commit into
mainfrom
fix/public-url
Nov 27, 2026
Merged

elyess merged 1 commit into
mainfrom
fix/public-url

Conversation

@elyess

@elyess elyess commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • The live server reports https://kinlore.example.com as its address (GET /api/auth/setup-status → setup_url), so invitation links pointed to an example domain.
  • App\Support\PublicUrl: APP_URL stays authoritative when real; for a placeholder (empty, localhost, loopback, 0.0.0.0, example.com/.org/.net hosts) links use the request address through the trusted proxies.
  • Used by invitation links, the invite page, the setup page, setup_url and kinlore:setup-token.
  • POST /v1/invitations returns public_url_configured; GET /health/detailed warns about a placeholder.
  • Docs: API reference, configuration (APP_URL placeholder and the Host header note), troubleshooting; app guides match app 1.5.0.

Checks

  • php artisan test: 233 passed, 1 skipped (new tests/Feature/PublicUrlTest.php).
  • npm run docs:build: passes.
  • Checked against a local server with a placeholder APP_URL: links use the request host and public_url_configured is false.

Deployment note

Not deployed. The server host should still pass the real APP_URL (in Docker Compose, the environment: block reads it from the .env next to docker-compose.yml and overrides kinlore-api/.env).

APP_URL stays authoritative when it is a real address. When it is empty, localhost, a loopback address, 0.0.0.0 or a host under example.com/.org/.net, the links use the address of the request (through the trusted proxies).

- App\Support\PublicUrl: base() and isConfigured(), used by invitation links, the invite page, the setup page, setup_url and kinlore:setup-token
- POST /v1/invitations returns public_url_configured
- GET /health/detailed: checks.public_url warns about a placeholder
- Tests: tests/Feature/PublicUrlTest.php
- Docs: API reference, configuration (APP_URL placeholder), troubleshooting; app guides match app 1.5.0 (families, family switcher, signed-in devices, comment delete)
@elyess
elyess merged commit e86a501 into main Nov 27, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant