1

There is a ContentTypeFilterListener listener that checks content-type headers in Apigility. I do not need it and is often causing an error message:

Invalid content-type specified.

Is there any way to completely disable this feature?

Wilt
  • 41,477
  • 12
  • 152
  • 203
laurent
  • 88,262
  • 77
  • 290
  • 428

1 Answers1

1

The ContentTypeFilterListener is attached to the EventManager here in the Module.php on line 46 with the attachAggregate method:

$em->attachAggregate($services->get('ZF\ContentNegotiation\ContentTypeFilterListener'));

This means you can also detach it again with detachAggregate:

$em->detachAggregate($services->get('ZF\ContentNegotiation\ContentTypeFilterListener'));

You should be able to do this after it has been attached.

Wilt
  • 41,477
  • 12
  • 152
  • 203