How to enable side loading of apps on SharePoint site
Sideloading apps is insecure. The main reason for blocking sideloading by default on non-developer sites is the risk that faulty apps pose to their host web/host site collection. Apps have the potential to destroy data and make sites or, given enough permissions, can even make site collections unusable. Therefore, apps should be sideloaded in dev/test environments and in production.
In order to enable sideloading please use following script on a site which has sideloading blocked