Access to XMLHttpRequest at 'https://services.example.com' from origin 'https://www.example.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. #3963
EbaadAhmed
started this conversation in
General
Replies: 1 comment 6 replies
-
In future please format your code so it's readable.
Needs to be fixed upstream see https://bitbucket.org/chromiumembedded/cef/issues/2918/cefaddcrossoriginwhitelistentry-not-fully
Please provide a more detailed code example. You might not actually be setting the headers correctly. |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, using Cefsharp windows version 96.0.180
facing this issue (not using the actual website name, replaced with example.com)
Access to XMLHttpRequest at 'https://services.example.com' from origin 'https://www.example.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
i tried the following things but still facing the issue
settings.RegisterScheme(new CefCustomScheme {
SchemeName = "https",
DomainName = "www.example.com"
});
tried modifying the request headers in ResourceRequestHandle onbeforeResourceload
headers["Access-Control-Allow-Origin"] = "https://www.example.com/";
headers["Access-Control-Allow-Methods"] = "GET, POST, PUT";
headers["Access-Control-Allow-Headers"] = "Content-Type";
headers["Access-Control-Allow-Credentials"] = "true";
Beta Was this translation helpful? Give feedback.
All reactions