How do I fix the error Access to fetch at URL from origin has been blocked by CORS policy after enabling CORS?
19 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
MathWorks Support Team
am 9 Feb. 2021
Beantwortet: MathWorks Support Team
am 25 Feb. 2021
I am using MATLAB Production Server with a .NET client and I am seeing the following error in the web browser's console:
- Access to fetch at <URL> from origin <origin> has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
- Uncaught (in promise) TypeError: Failed to fetch
- Cross-Origin Read Block (CORB) blocked cross-origin response <URL> with MIME type text/html.
- Uncaught (in promise) TypeError: Failed to fetch TypeError: Failed to fetch
I have already tried enabling CORS and am now getting this error in my .NET application. Why am I still getting this error?
Akzeptierte Antwort
MathWorks Support Team
am 9 Feb. 2021
With MATLAB Production Server, CORS stands for Cross-Origin Resource Sharing and indicates the domain(s) from which clients can create MPS instances. In the MPS instance, edit the main_config file and enable CORS there.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu MATLAB Parallel Server finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!