Rather than mix fe and be urls separate them out to their own api urls. This way it's simpler to deal with multi sites.