Shopware is adding host Url to some network requests causing 404

The issue was with the Apache Module mod_rewrite. I haven’t enable the rewrite module from apache. It is clearly mentioned in the shopware doc, but I missed it.

More details about mod_rewrite: mod_rewrite - Apache HTTP Server Version 2.4