Diese Konversation wurde aufgrund von Inaktivität geschlossen. Bitte erstellen Sie einen neuen Post.
Level 1
Level 2
Melden Sie sich an, um alle Badges zu sehen
Diese Konversation wurde aufgrund von Inaktivität geschlossen. Bitte erstellen Sie einen neuen Post.
Hi.
I'm trying to send a request to AEM from React. But I get either a CORS error or an empty response with status 200, but from the browser the response has a body.
Tell me how to set it up if:
AEM localhost:4502
React localhost:3000
Config
React fetch
Thank you very much in advance)
Gelöst! Gehe zu Lösung.
Zugriffe
Antworten
Likes gesamt
Hello @aliaksandr_hvoz
There is a detailed adobe documentation on how to deal with CORS errors. Please refer to https://experienceleague.adobe.com/docs/experience-manager-learn/foundation/security/understand-cros...
One would have to update :
Even steps for debugging are available on the link
You may consider adding "Authorization" in the Supported Headers. Please refer to the Site 2 example, which requires authentication. https://experienceleague.adobe.com/docs/experience-manager-learn/foundation/security/understand-cros...
"supportedheaders":[
"Origin",
"Accept",
"X-Requested-With",
"Content-Type",
"Access-Control-Request-Method",
"Access-Control-Request-Headers",
"Authorization", // New
"CSRF-Token" // New
]
Hello @aliaksandr_hvoz
There is a detailed adobe documentation on how to deal with CORS errors. Please refer to https://experienceleague.adobe.com/docs/experience-manager-learn/foundation/security/understand-cros...
One would have to update :
Even steps for debugging are available on the link
@aliaksandr_hvoz Do you find the suggestions from users useful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity.
Zugriffe
Antworten
Likes gesamt
Zugriffe
Likes
Antworten
Zugriffe
Likes
Antworten
Zugriffe
Likes
Antworten
Zugriffe
Likes
Antworten