避免在模块FrontController中重定向

I am building an api for my PrestaShop module using a module FrontController.

class mymoduleModuleFrontController extends ModuleFrontController
{
    public function init()
    {
       echo "Hello world"; 
    }
}

The controller runs fine under mydomain.com/index.php?fc=module&module=mymodule&controller=api

However.. When I change shop domain to for example mynewdomain.com, PrestaShop automatically redirects me from mydomain.com/index.php?fc=module&module=mymodule&controller=api to mynewdomain.com/index.php?fc=module&module=mymodule&controller=api.

How can I disable automatic redirect for a PrestaShop ModuleFrontController?

I even tried to make it independent of the PrestaShop controller-system by accessing a PHP-file in my module-dir:

require_once(dirname(__FILE__).'/../../config/config.inc.php');
require_once('mymodule.php');

Even that last approach redirects me to the new domain.

Is there any way to disable PrestaShop redirects for a script?