CORS policy blocking HTTP requests

CORS policy blocking HTTP requests

I am making a web page that makes POST requests. I am doing this with JavaScript and have tested the request with Node. With Node, I get a response in XML on the console, so my code is 100% correct, but when I actually place it in my web page I get a CORS error.

This is the error I get:
  1. newPage.htm:1 Access to XMLHttpRequest at 'http://mysitename' from origin 'http://127.0.0.1:5500' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
I have tried to solve this problem and edited the IncludeSDPScripts file and added: parent=this; to the beginning.

That didnt work so I navigated to my web.xml file inside \ManageEngine\ServiceDesk\server\default\conf and added the following:

  1. <init-param>
  2.          <param-name>Access-Control-Allow-Origin</param-name>
  3.          <param-value>http://127.0.0.1/newPage.htm</param-value>
  4. </init-param>
This still does not fix the problem. Does anyone have any suggestions? Am I doing this wrong?

I am following the steps from this link 

                  New to ADSelfService Plus?