Thanks to @cschroed’s comment I was able to fix this by setting config.action_dispatch.tld_length = 0
in config/environments/development
.
The default is 1, which works in prod environments.
CLICK HERE to find out more related problems solutions.