virtualMachinenodejs

Enable CORS

Edit the Apache configuration file at /opt/bitnami/apache/conf/bitnami/bitnami.conf and add the following directive to the end of the file. Replace the DOMAIN placeholder with the domain name that you wish to permit requests from.

<IfModule headers_module>
      Header set Access-Control-Allow-Origin "DOMAIN"
</IfModule>

Then, restart your Apache server by executing the command below:

$ sudo /opt/bitnami/ctlscript.sh restart apache
Last modification December 21, 2022