Der folgende Fehler wirft mich bei einer Anfrage aus: < /p>
Access to XMLHttpRequest at 'My Server URL' from origin 'Server Name' has been
blocked by CORS policy: The 'Access-Control-Allow-Origin' header contains multiple
values 'Server Name, *', but only one is allowed.
< /code>
In meiner Datei webapiconfig.cs habe ich die CORS -Richtlinie wie folgt definiert: < /p>
var cors = new EnableCorsAttribute("MyServerName", "Content-Type", "GET,PUT,POST,DELETE");
config.EnableCors(cors);
< /code>
Ich habe nur einen Wert myServername < /em> definiert, aber der geworfene Fehler definiert ihn als 'Servername, *' < /code> < /p>
update: < /strong> < /p>
Access to XMLHttpRequest at 'My Server URL' from origin 'Server Name' has been
blocked by CORS policy: The value of the 'Access-Control-Allow-Origin' header in
the response must not be the wildcard '*' when the request's credentials mode is
'include'. The credentials mode of requests initiated by the XMLHttpRequest is
controlled by the withCredentials attribute.
< /code>
Ich habe keine CORs in meiner Web.config-Datei definiert.>
Der folgende Fehler wirft mich bei einer Anfrage aus: < /p>
Access to XMLHttpRequest at 'My Server URL' from origin 'Server Name' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header contains multiple values 'Server Name, *', but only one is allowed. < /code>
In meiner Datei webapiconfig.cs habe ich die CORS -Richtlinie wie folgt definiert: < /p>
var cors = new EnableCorsAttribute("MyServerName", "Content-Type", "GET,PUT,POST,DELETE"); config.EnableCors(cors); < /code>
Ich habe nur einen Wert myServername < /em> definiert, aber der geworfene Fehler definiert ihn als 'Servername, *' < /code> < /p>
update: < /strong> < /p>
Access to XMLHttpRequest at 'My Server URL' from origin 'Server Name' has been blocked by CORS policy: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute. < /code>
Ich habe keine CORs in meiner Web.config-Datei definiert.>
Es ist mir gelungen, die Microsoft Graph-API einzurichten und in einer Web-API-App zum Laufen zu bringen, in der eine Post-Anfrage erfolgreich war, um das Bearer-Token abzurufen und erneut die E-Mail...
Ich habe ein Problem, ich entwickle eine Webseite, die aus einem Server und einem Client besteht.
Server: Es ist eine erholsame API mit ExpressJS. Ich habe eine Route dorthin
//* @route GET...
Es wird gesagt, dass man, anstatt alle Domänen zu CORS hinzuzufügen, nur eine Reihe von Domänen hinzufügen sollte.
Dennoch ist es manchmal nicht trivial, eine Reihe von Domänen hinzuzufügen. Z.B....
Ich scheine auf einige Probleme mit meinen CORS -Konfigurationen zu stoßen. Ich benutze Keycloak für meine Authentifizierung. Alle meine Endpunkte werden mit einem Fehler 302 (gefunden) zu einer...