My problem is the message: 'No' Access-Control-Allow-Origin 'header is present on the requested resource. Origin 'http: // localhost: 4200' is therefore not allowed access. "
I am still on verion 5.5 of ASpnetzero. The front and back are local, here are the configs: Appsettings.js:
"App": { "ServerRootAddress": "http: // localhost: 22742", "ClientRootAddress": "http: // localhost: 4200",
"CorsOrigins": "http: //.mycompany.com,http: // localhost: 22742, http: // localhost: 4200, http: //www.certigreen.be,http: //www.certigreen.be /public/"
}
Appconfig.json
"remoteServiceBaseUrl": "http: // localhost: 22742", "appBaseUrl": "http: // localhost: 4200",
When I change the url of self.temporaryPictureUrl = "http://www.certigreen.be/public/visits/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; at //self.temporaryPictureUrl = AppConsts.remoteServiceBaseUrl + '/ Temp / Downloads /' + 'visits.json'; I have the erratic message mentioned above. Help me please
5 Answer(s)
-
0
<a class="postlink" href="http://www.certigreen.be/public/visits/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX">http://www.certigreen.be/public/visits/ ... XXXXXXXXXX</a>
This site does not support cross-domain access. You cannot change this.
-
0
This url gives me a json file. I hid the url on purpose. When I type the full url I have access to this file. It's my local configuration that is problematic
[https://prnt.sc/kggzg7])
-
0
If this website (<a class="postlink" href="https://www.certigreen.be/">https://www.certigreen.be/</a>) is not yours, you cannot modify his cross-domain strategy.
<a class="postlink" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS">https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS</a>
-
0
Thank you for all these clarifications.
-
0
You're welcome.