-
Notifications
You must be signed in to change notification settings - Fork 608
CORS Issue with Angular app #332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Can you help with the URLs that are being accessed from/to here? Domain1/Domain2 works for illustration purposes, but I'm not sure which resources you're trying to load. Is it the static content? The profiler JSON after the script tag, other? |
If more info is available, please ping me here and I'll re-open, since this is situational it's impossible to help without more to go on. |
I'm having this same issue, I think. I have my profiled api on a different domain. It seems that MiniProfiler was built under the assumption that the UI and profiled database would live on the same domain, which is not the case for me. I get the same CORS error when calling domain2 from domain1 since the include.js is making those calls on it's own. I have an Angular UI calling an Asp.Net Core API, which is profiled. It would be great to have the ability to add headers to all http requests that MiniProfiler makes. Since I'm using Angular I have to hardcode the script locations that would be rendered automatically by ASP.Net on domain2. Maybe a "script initializer" would be possible to add?
I love MiniProfiler, such a great job! |
I'm also having this issue. I have an angular app running on http://localhost:4200 and loading the script from my .net core api running on http://localhost:15000 I've added the script tag to my angular app like this:
But I get the following error in chrome dev tools console:
|
Hi,
I try to get mini profiler running, it seems that everything works except I cant get the results from the server to my client (other domain) because I get
response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
How can I set the headers? Middleware and the normal CORS seems not to work here.
The text was updated successfully, but these errors were encountered: