← Statpro dev log

A 301 redirect killed every sign-up for nine days

#mobile#product#web#sports

A line bends at a turn marker; a glowing amber packet flies off at the corner and only an empty dashed outline travels on to the server

For nine days, "Continue with Apple" in my iOS app did nothing, and neither did any save. No crash, no error screen, nothing in the logs. The sign-up request from the app never reached the server.

The app is the iOS version of Statpro, a sports stats and betting-research site. It shows the same stats and answers as the website, and you can sign in with Apple to save things.

Every page in the app kept loading, because page loads are GETs and GETs were healthy the whole time. A green dashboard over a broken product is an awful place to be. I lived there from November 12 until last night.

A 301 turns a POST into an empty GET

The cause was one line of server config. I'd made statpro.io 301-redirect (a permanent redirect) to www.statpro.io, which is standard practice for search and works for anyone browsing the site. It also broke the app, because of a rule I'd never had to think about: a client that follows a 301 re-sends the request as a GET and drops the body. The server receives a GET with no sign-up data in it.

The record of app sessions showed it once I looked. Mobile GETs flowed all day, and the last mobile POST was stamped 2026-11-12 03:37 UTC.

BEFORE the app calls the bare domain App sends POST /sign-up 301 redirect to www Re-sent as GET, body dropped no sign-up last mobile POST: Nov 12, 03:37 UTC AFTER every app profile calls www directly App sends POST /sign-up Server receives the sign-up no redirect in the path signed up
Same app, same request. A 307 would have kept the method and body; a 301 keeps neither.

Redirects are for pages

Two rules go on my deploy checklist. If an API host must redirect, use a status that preserves the method and body. Better, point clients at the canonical host directly, so they never learn a host change through a redirect they half-follow.

I took the second route. Every app profile now talks to www.statpro.io explicitly: the production build, my test builds, the builds I submit for app store review, the setup I use to push app updates without a store release, and the app's default API URL.

Send the version with every call

The same release needed one more change. A feature in it had to appear for new builds without locking out existing installs, and a global switch couldn't do both. So the app now sends its native version (the version of the installed app itself) on every API call, and the server decides per build. Most of the fix was reading what the app was sending.

This is the build log for Statpro (statpro.io) · All entries · Weekly essays