Creating iframe to be used in other websites I've created a controller with the route "/get-info", the controller return a template custom-info.html.twig

my_module/src/Controller/MyController.php file:

&lt;?php

namespace Drupal\my_module\Controller;

use Drupal\Core\Controller\ControllerBase;

class MyController extends ControllerBase {

  public function content() {

    return [
      '#theme' =&gt; "custom_info",
    ];
  }
}


my_module/templates/custom-info.html.twig file:

&lt;h1&gt; Hello World &lt;/h1&gt;


When visiting the path: www.mySite.com/get-info I get response with the header an footer of my site and "Hello World" as content. but when using &lt;iframe src="www.mySite.com/get-info"&gt;&lt;/iframe&gt; in an other Drupal project I get an empty iframe. 

Is this the right way to create iFrame-ready Widgets in Drupal 8? if so what should I add/remove to make it work?
The problem was solved by installing and enabling Allow site iframing contrib module.


  Drupal 8 has a feature built into core that stops the site from being
  rendered within an iframe, there are good reasons for this -
  https://www.drupal.org/node/2514136 But sometimes you want your site
  in an iframe, so that's what this module does.