Skip to content Skip to sidebar Skip to footer

How To Change Origin Of Request Header From Localhhost To "*"

Check out image Below Please Do needful help . I want to change the origin of the request header from local host to '*' or to any of weburl.i am using Ajax Call for requesting the

Solution 1:

You cannot change the Origin header the browser sends when your JavaScript asks it to make an HTTP request. (Firefox, at least, will ignore attempts to set it).

There isn't any point in changing it anyway. The point of the header is so that a server can grant permissions with CORS for multiple different origins without granting permission for all origins. If the server isn't responding with * by default then it isn't going to look at the Origin you say you are from and decide that * is suddenly acceptable.

You need to address the cross-origin issues on the server, not the client.

Post a Comment for "How To Change Origin Of Request Header From Localhhost To "*""