better-auth-repro

Here's how to reproduce the issue:

  • pnpm i to install dependencies
  • Copy .env.example to .env (leave as is)
  • pnpm run docker:preview make a docker image and run it
  • curl http://localhost:3000/api/auth/ok will respond with 404 page
  • Uncomment the line in .env
  • Comment out the baseURL in src/lib/server/auth.ts
  • pnpm run docker:preview make a new docker image and run it
  • curl http://localhost:3000/api/auth/ok will respond ok