Unable to get C.O.R.S on multisite working


I am unable to get C.O.R.S (Cross-origin resource sharing) working on my module on a multi-site running on Dupal 8.3.5, my website is also run by Apache. I have tried the https://www.drupal.org/node/2715637, and older methods: such as configuring the .htaccess files and trying to add header("Access-Control-Allow-Origin: *"); with no avail.

The services file has been edited an copied in default as well as the sub folder for my multisite, and the module is located in sites/sub-site/modules. I am trying to access an API I have written—on the same domain—from Drupal, and access it through javascript(not ajax) through the POST method. If anyone has any experience or ideas please share as I have been working on this for about 10 hours now and have run out of ideas.

Thank you,


Drupal version: 

Source: https://www.drupal.org/taxonomy/term/4/feed