Sling model exporter + ReactJS - CORS error

aliaksandr_hvoz

04-04-2020

Hello.

Could you give me some advice on how to fix the error:

aliaksandr_hvoz_0-1586061483205.png

 

I created a Sling Model with an exporter and I'm trying to get JSON on request from the ReactJS App.

ReactJS app:

aliaksandr_hvoz_1-1586036150777.png

aliaksandr_hvoz_0-1586061233842.png

 

 

I also created a filter for the set headers for CORS:

aliaksandr_hvoz_3-1586036270269.png

aliaksandr_hvoz_1-1586061305291.png

 

 

If I make a request from the browser, I will get JSON but not from ReactApp.

 

And configuration from AEM:

aliaksandr_hvoz_5-1586036493658.png

I use AEM 6.4 version. 

Could you please tell how to solve this problem.

 

Thanks in advance for any advice.