I often use port 5000 when developing web apps, and it wasn’t working on my Mac: always returning a 403 error, but only in Chrome: Firefox and curl both worked.
The clue was that the user agent was AirTunes/800.74.5
. A little searching uncovered that Apple is using this port for AirPlay.
To disable it: Settings -> General -> AirDrop & Handoff -> AirPlay Receiver: off
No idea why it was only a problem in Chrome: maybe Chrome resolves localhost
differently?