The 'Access-Control-Allow-Origin' header contains multiple values Issue in Pimcore graphql service

I created two types apis

  1. Using Datahub (graphql)
  2. Custom web apis

when i am trying call graphql api i am getting multiple header because i set cross origin header in .htaccess file.
but if i remove from .htacces i am getting cross origin issue on my custom web api.

Please help me.

Install Nelmios CORS bundle, it works like a treat.