How Do I Add Access-Control Allow Origin Header in WordPress?

Adding an access-control allow origin header in WordPress is fairly straightforward. First, open the WordPress admin area and click on the Settings menu item. From the Settings menu, select the Security tab and then click on the Access Control option. This will open the Access Control Settings page.

On this page, you will need to enter the domain name or IP address of the server where WordPress is installed. You will also need to add a allow origin header. To add this header, click on the Add New Rule button and then enter the following line of code into the allow origin field:.

*

allowOrigin: “http://localhost/”.