![]() ![]() To get around this you can use a domain like localho.st (which ![]() (a bug opened in 2010, marked WontFix in 2014). If this information helps you, be sure to go upvote those two questions and answers over on Stack Overflow, they deserve credit, too.Ĭhrome does not support localhost for CORS I got this idea from this question on Stack Overflow. There's a question with an answer that goes in to more detail you may want to read.Īssuming this is just for testing purposes, you can prop up a fake domain name on a local DNS, and then use that instead. I believe all major browsers specifically ignore localhost as a legal target for Access-Control-Allow-Origin as a security measure. I have asked for the origin the request header again and having a look in the Request Headers section and it looks like the "Referer" is a localhost: I have used this link as a guidance -, but am I meant to add both the IP address and the localhost in the CORS? Unfortunately, looking at the origin in the error message, I have realised I have been given the URL that appears in the browser's address bar to add it on the allowlist, rather than the origin URL as I have asked for. I have enabled the CORS in Salesforce, but the developer is receiving the below error message, when they are trying to submit a Lead: Failed to load resource: the server responded with a status of 404 (Not Found)Īccess to HMLHttpRequest at from origin " has been blocked by CORS policy: No "Access-Control-Allow-Origin" header is present on the requested resource. The developer has included the Web-to-Lead form I have provided in his React - js application. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |