I figured out what’s wrong. I was using the command strapi develop to run the application on the production server. This explains why the server attempts to load contents from localhost. The solution is there to change the run script to strapi start.